[Python-modules-team] Bug#884430: test_nothing_logged.py:7: AssertionError

Daniel Stender debian at danielstender.com
Fri Dec 15 07:56:27 UTC 2017


Source: pytest-catchlog
Version: 1.2.2+git20170915-2
Severity: serious
Justification: fails to build from source

pytest-catchlog currently FTBFS:
<cut>
I: pybuild base:184: python2.7 -m pytest -v -x
============================= test session starts ==============================
platform linux2 -- Python 2.7.14+, pytest-3.2.1, py-1.4.34, pluggy-0.4.0 -- /usr/bin/python2.7
cachedir: .cache
rootdir: /<<PKGBUILDDIR>>, inifile:
plugins: catchlog-1.2.2
collecting ... collected 14 items

test_pytest_catchlog.py::test_nothing_logged FAILED

=================================== FAILURES ===================================
_____________________________ test_nothing_logged ______________________________

testdir = <Testdir local('/tmp/pytest-of-aham/pytest-0/testdir/test_nothing_logged0')>

    def test_nothing_logged(testdir):
        testdir.makepyfile('''
            import sys
            import logging
    
            def test_foo():
                sys.stdout.write('text going to stdout')
                sys.stderr.write('text going to stderr')
                assert False
            ''')
        result = testdir.runpytest()
        assert result.ret == 1
        result.stdout.fnmatch_lines(['*- Captured stdout call -*',
                                     'text going to stdout'])
        result.stdout.fnmatch_lines(['*- Captured stderr call -*',
                                     'text going to stderr'])
        py.test.raises(Exception, result.stdout.fnmatch_lines,
>                      ['*- Captured *log call -*'])
E       Failed: nomatch: '*- Captured stdout call -*'
E           and: u'============================= test session starts =============================='
E           and: u'platform linux2 -- Python 2.7.14+, pytest-3.2.1, py-1.4.34, pluggy-0.4.0'
E           and: u'rootdir: /tmp/pytest-of-aham/pytest-0/testdir/test_nothing_logged0, inifile:'
E           and: u'plugins: catchlog-1.2.2'
E           and: u'collected 1 item'
E           and: u''
E           and: u'test_nothing_logged.py F'
E           and: u''
E           and: u'=================================== FAILURES ==================================='
E           and: u'___________________________________ test_foo ___________________________________'
E           and: u''
E           and: u'    def test_foo():'
E           and: u"        sys.stdout.write('text going to stdout')"
E           and: u"        sys.stderr.write('text going to stderr')"
E           and: u'>       assert False'
E           and: u'E       assert False'
E           and: u''
E           and: u'test_nothing_logged.py:7: AssertionError'
E       fnmatch: '*- Captured stdout call -*'
E          with: u'----------------------------- Captured stdout call -----------------------------'
E       exact match: 'text going to stdout'
E       nomatch: '*- Captured stderr call -*'
E           and: u'============================= test session starts =============================='
E           and: u'platform linux2 -- Python 2.7.14+, pytest-3.2.1, py-1.4.34, pluggy-0.4.0'
E           and: u'rootdir: /tmp/pytest-of-aham/pytest-0/testdir/test_nothing_logged0, inifile:'
E           and: u'plugins: catchlog-1.2.2'
E           and: u'collected 1 item'
E           and: u''
E           and: u'test_nothing_logged.py F'
E           and: u''
E           and: u'=================================== FAILURES ==================================='
E           and: u'___________________________________ test_foo ___________________________________'
E           and: u''
E           and: u'    def test_foo():'
E           and: u"        sys.stdout.write('text going to stdout')"
E           and: u"        sys.stderr.write('text going to stderr')"
E           and: u'>       assert False'
E           and: u'E       assert False'
E           and: u''
E           and: u'test_nothing_logged.py:7: AssertionError'
E           and: u'----------------------------- Captured stdout call -----------------------------'
E           and: u'text going to stdout'
E       fnmatch: '*- Captured stderr call -*'
E          with: u'----------------------------- Captured stderr call -----------------------------'
E       exact match: 'text going to stderr'
E       nomatch: '*- Captured *log call -*'
E           and: u'============================= test session starts =============================='
E           and: u'platform linux2 -- Python 2.7.14+, pytest-3.2.1, py-1.4.34, pluggy-0.4.0'
E           and: u'rootdir: /tmp/pytest-of-aham/pytest-0/testdir/test_nothing_logged0, inifile:'
E           and: u'plugins: catchlog-1.2.2'
E           and: u'collected 1 item'
E           and: u''
E           and: u'test_nothing_logged.py F'
E           and: u''
E           and: u'=================================== FAILURES ==================================='
E           and: u'___________________________________ test_foo ___________________________________'
E           and: u''
E           and: u'    def test_foo():'
E           and: u"        sys.stdout.write('text going to stdout')"
E           and: u"        sys.stderr.write('text going to stderr')"
E           and: u'>       assert False'
E           and: u'E       assert False'
E           and: u''
E           and: u'test_nothing_logged.py:7: AssertionError'
E           and: u'----------------------------- Captured stdout call -----------------------------'
E           and: u'text going to stdout'
E           and: u'----------------------------- Captured stderr call -----------------------------'
E           and: u'text going to stderr'
E           and: u'=========================== 1 failed in 0.02 seconds ==========================='
E           and: u''
E       remains unmatched: '*- Captured *log call -*'

/<<PKGBUILDDIR>>/test_pytest_catchlog.py:27: Failed
----------------------------- Captured stdout call -----------------------------
============================= test session starts ==============================
platform linux2 -- Python 2.7.14+, pytest-3.2.1, py-1.4.34, pluggy-0.4.0
rootdir: /tmp/pytest-of-aham/pytest-0/testdir/test_nothing_logged0, inifile:
plugins: catchlog-1.2.2
collected 1 item

test_nothing_logged.py F

=================================== FAILURES ===================================
___________________________________ test_foo ___________________________________

    def test_foo():
        sys.stdout.write('text going to stdout')
        sys.stderr.write('text going to stderr')
>       assert False
E       assert False

test_nothing_logged.py:7: AssertionError
----------------------------- Captured stdout call -----------------------------
text going to stdout
----------------------------- Captured stderr call -----------------------------
text going to stderr
=========================== 1 failed in 0.02 seconds ===========================
!!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!
=========================== 1 failed in 0.14 seconds ===========================
E: pybuild pybuild:283: test: plugin custom failed with: exit code=2: python2.7 -m pytest -v -x
</cut>

DS

-- System Information:
Debian Release: 9.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)



More information about the Python-modules-team mailing list