TestDist.test_setuptools_abi_1 fails in cffi-1.1.0
Created originally on Bitbucket by jlec (Justin)
#!python
______________________________________________________________ TestDist.test_setuptools_abi_1 _______________________________________________________________
self = <testing.cffi1.test_zdist.TestDist object at 0x2ac7e86bbe10>
@chdir_to_tmp
def test_setuptools_abi_1(self):
self._make_setuptools_abi()
self.run(["setup.py", "build"])
self.check_produced_files({'setup.py': None,
'build': '?',
'src0': {'pack2': {'__init__.py': None,
> '_build.py': None}}})
../../../work/cffi-1.1.0-python3_3/testing/cffi1/test_zdist.py:288:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <testing.cffi1.test_zdist.TestDist object at 0x2ac7e86bbe10>, content = {'build': '?'}
curdir = '/var/tmp/portage/dev-python/cffi-1.1.0/temp/ffi-0/test_setuptools_abi_1'
def check_produced_files(self, content, curdir=None):
if curdir is None:
curdir = str(self.udir)
found_so = None
for name in os.listdir(curdir):
if (name.endswith('.so') or name.endswith('.pyd') or
name.endswith('.dylib')):
found_so = os.path.join(curdir, name)
name = name.split('.')[0] + '.SO' # foo.cpython-34m.so => foo.SO
if name.startswith('pycparser') and name.endswith('.egg'):
continue # no clue why this shows up sometimes and not others
assert name in content, "found unexpected file %r" % (
os.path.join(curdir, name),)
value = content.pop(name)
if value is None:
assert name.endswith('.SO') or (
os.path.isfile(os.path.join(curdir, name)))
else:
subdir = os.path.join(curdir, name)
assert os.path.isdir(subdir)
if value == '?':
continue
found_so = self.check_produced_files(value, subdir) or found_so
> assert content == {}, "files or dirs not produced in %r: %r" % (
curdir, content.keys())
E AssertionError: files or dirs not produced in '/var/tmp/portage/dev-python/cffi-1.1.0/temp/ffi-0/test_setuptools_abi_1': dict_keys(['build'])
E assert {'build': '?'} == {}
E Left contains more items:
E {'build': '?'}
E Full diff:
E - {'build': '?'}
E + {}