Issue #83 invalid

apparent regression in test_zintegration.py; cffi-0.6

idella5
created an issue

in running tests of cffi-0.5

-----------------
testing/test_zintegration.py:60: test_infrastructure PASSED
testing/test_zintegration.py:66: test_distutils_module PASSED
testing/test_zintegration.py:73: test_distutils_package_1 PASSED
testing/test_zintegration.py:80: test_distutils_package_2 PASSED
testing/test_zintegration.py:87: test_setuptools_module PASSED
testing/test_zintegration.py:94: test_setuptools_package_1 PASSED
testing/test_zintegration.py:101: test_setuptools_package_2 PASSED

in 0.6

testing/test_zintegration.py:75: test_infrastructure PASSED
testing/test_zintegration.py:81: test_distutils_module FAILED

============================================================ FAILURES =============================================================
______________________________________________________ test_distutils_module ______________________________________________________

    def test_distutils_module():
        run_setup_and_program("distutils_module", '''
        import snip_basic_verify
        p = snip_basic_verify.C.getpwuid(0)
        assert snip_basic_verify.ffi.string(p.pw_name) == b"root"
>       ''')

testing/test_zintegration.py:86: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

dirname = 'distutils_module'
python_snippet = '\n    import snip_basic_verify\n    p = snip_basic_verify.C.getpwuid(0)\n    assert snip_basic_verify.ffi.string(p.pw_name) == b"root"\n    '

    def run_setup_and_program(dirname, python_snippet):
        venv_dir = create_venv(dirname + '-cpy')
        really_run_setup_and_program(dirname, venv_dir, python_snippet)
        #
        sys._force_generic_engine_ = True
        try:
            venv_dir = create_venv(dirname + '-gen')
            really_run_setup_and_program(dirname, venv_dir, python_snippet)
        finally:
            del sys._force_generic_engine_
        # the two files lextab.py and yacctab.py are created by not-correctly-
        # installed versions of pycparser.
>       assert not os.path.exists(str(SNIPPET_DIR.join(dirname, 'lextab.py')))
E       assert not True
E        +  where True = <function exists at 0x7f12233e0f50>('/mnt/gen2/TmpDir/portage/dev-python/cffi-0.6/work/cffi-0.6/testing/snippets/distutils_module/lextab.py')
E        +    where <function exists at 0x7f12233e0f50> = <module 'posixpath' from '/usr/lib64/python2.7/posixpath.pyc'>.exists
E        +      where <module 'posixpath' from '/usr/lib64/python2.7/posixpath.pyc'> = os.path
E        +    and   '/mnt/gen2/TmpDir/portage/dev-python/cffi-0.6/work/cffi-0.6/testing/snippets/distutils_module/lextab.py' = str(local('/mnt/gen2/TmpDir/portage/dev-python/cffi-0.6/work/cffi-0.6/testing/snippets/distutils_module/lextab.py'))
E        +      where local('/mnt/gen2/TmpDir/portage/dev-python/cffi-0.6/work/cffi-0.6/testing/snippets/distutils_module/lextab.py') = <bound method LocalPath.join of local('/mnt/gen2/TmpDir/portage/dev-python/cffi-0.6/work/cffi-0.6/testing/snippets')>('distutils_module', 'lextab.py')
E        +        where <bound method LocalPath.join of local('/mnt/gen2/TmpDir/portage/dev-python/cffi-0.6/work/cffi-0.6/testing/snippets')> = SNIPPET_DIR.join

testing/test_zintegration.py:72: AssertionError
--------------------------------------------------------- Captured stdout ---------------------------------------------------------

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================= 1 failed, 941 passed, 40 skipped in 101.51 seconds ========================================

Comments (2)

  1. Armin Rigo

    As the test explains:

        # the two files lextab.py and yacctab.py are created by not-correctly-
        # installed versions of pycparser.
    

    This is a new check so it didn't fail in cffi 0.5, even if pycparser was not correctly installed. It is misinstalled in your case because it creates local fies lextab.py and yacctab.py that are missing in the installation.

  2. Log in to comment