[Python-modules-team] Bug#915896: python-py FTBFS: test failures

Adrian Bunk bunk at debian.org
Fri Dec 7 18:44:31 GMT 2018


Source: python-py
Version: 1.7.0-1
Severity: serious
Tags: ftbfs

Some recent change in unstable makes python-py FTBFS:

https://tests.reproducible-builds.org/debian/history/python-py.html
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/python-py.html

...
=================================== FAILURES ===================================
___________________________ test_apiwarn_functional ____________________________

recwarn = WarningsRecorder(record=True)

    def test_apiwarn_functional(recwarn):
        capture = py.io.StdCapture()
        py.log._apiwarn("x.y.z", "something", stacklevel=1)
        out, err = capture.reset()
        py.builtin.print_("out", out)
        py.builtin.print_("err", err)
>       assert err.find("x.y.z") != -1
E       AssertionError: assert -1 != -1
E        +  where -1 = <built-in method find of unicode object at 0x7fca862b7180>('x.y.z')
E        +    where <built-in method find of unicode object at 0x7fca862b7180> = ''.find

testing/log/test_warning.py:26: AssertionError
----------------------------- Captured stdout call -----------------------------
out 
err 
_______________________________ test_stacklevel ________________________________

recwarn = WarningsRecorder(record=True)

    def test_stacklevel(recwarn):
        def f():
            py.log._apiwarn("x", "some", stacklevel=2)
        # 3
        # 4
        capture = py.io.StdCapture()
        f()
        out, err = capture.reset()
        lno = py.code.getrawcode(test_stacklevel).co_firstlineno + 6
        warning = str(err)
>       assert warning.find(":%s" % lno) != -1
E       AssertionError: assert -1 != -1
E        +  where -1 = <built-in method find of str object at 0x7fca86286508>((':%s' % 37))
E        +    where <built-in method find of str object at 0x7fca86286508> = ''.find

testing/log/test_warning.py:41: AssertionError
_____________________ test_stacklevel_initpkg_with_resolve _____________________

testdir = <Testdir local('/tmp/pytest-of-pbuilder1/pytest-0/test_stacklevel_initpkg_with_resolve0')>
recwarn = WarningsRecorder(record=True)

    def test_stacklevel_initpkg_with_resolve(testdir, recwarn):
        testdir.makepyfile(modabc="""
            import py
            def f():
                py.log._apiwarn("x", "some", stacklevel="apipkg123")
        """)
        testdir.makepyfile(apipkg123="""
            def __getattr__():
                import modabc
                modabc.f()
        """)
        p = testdir.makepyfile("""
            import apipkg123
            apipkg123.__getattr__()
        """)
        capture = py.io.StdCapture()
        p.pyimport()
        out, err = capture.reset()
        warning = str(err)
        loc = 'test_stacklevel_initpkg_with_resolve.py:2'
>       assert warning.find(loc) != -1
E       AssertionError: assert -1 != -1
E        +  where -1 = <built-in method find of str object at 0x7fca86286508>('test_stacklevel_initpkg_with_resolve.py:2')
E        +    where <built-in method find of str object at 0x7fca86286508> = ''.find

/build/1st/python-py-1.7.0/testing/log/test_warning.py:63: AssertionError
______________________ test_stacklevel_initpkg_no_resolve ______________________

recwarn = WarningsRecorder(record=True)

    def test_stacklevel_initpkg_no_resolve(recwarn):
        def f():
            py.log._apiwarn("x", "some", stacklevel="apipkg")
        capture = py.io.StdCapture()
        f()
        out, err = capture.reset()
        lno = py.code.getrawcode(test_stacklevel_initpkg_no_resolve).co_firstlineno + 2
        warning = str(err)
>       assert warning.find(":%s" % lno) != -1
E       AssertionError: assert -1 != -1
E        +  where -1 = <built-in method find of str object at 0x7fca86286508>((':%s' % 67))
E        +    where <built-in method find of str object at 0x7fca86286508> = ''.find

testing/log/test_warning.py:73: AssertionError
________________________________ test_function _________________________________

recwarn = WarningsRecorder(record=True)

    def test_function(recwarn):
        capture = py.io.StdCapture()
        py.log._apiwarn("x.y.z", "something", function=test_function)
        out, err = capture.reset()
        py.builtin.print_("out", out)
        py.builtin.print_("err", err)
>       assert err.find("x.y.z") != -1
E       AssertionError: assert -1 != -1
E        +  where -1 = <built-in method find of unicode object at 0x7fca862b7180>('x.y.z')
E        +    where <built-in method find of unicode object at 0x7fca862b7180> = ''.find

testing/log/test_warning.py:82: AssertionError
...
 5 failed, 797 passed, 35 skipped, 15 xfailed, 1 xpassed, 656 warnings in 25.84 seconds 
E: pybuild pybuild:338: test: plugin custom failed with: exit code=1: python2.7 -m pytest testing -k-testing/log/test_warning.py
dh_auto_test: pybuild --test --test-pytest -i python{version} -p 2.7 returned exit code 13
make[1]: *** [debian/rules:10: override_dh_auto_test] Error 25



More information about the Python-modules-team mailing list