'Implement optional PEP302 api (#808).'

def test_get_data_support(self, testdir):

    path = testdir.mkpydir('foo')
    path.join('test_foo.py').write(_pytest._code.Source("\n                                                class    Test(object):\n                                                                def    test_foo(self):\n                                                                                import    pkgutil\n                                                                                data    =    pkgutil.get_data('foo.test_foo',    'data.txt')\n                                                                                assert    data    ==    b'Hey'\n                                "))
    path.join('data.txt').write('Hey')
    result = testdir.runpytest()
    result.stdout.fnmatch_lines('*1    passed*')
