[Python-modules-team] Bug#868780: pytest-catchlog: latest pytest breaks test_compat_camel_case_aliases

Daniel Stender debian at danielstender.com
Tue Jul 18 14:19:27 UTC 2017


Source: pytest-catchlog
Version: 1.2.2-1
Severity: serious
Justification: fails to build from source
Control: forwarded -1 https://github.com/eisensheng/pytest-catchlog/issues/68

Latest Pytest in Debian (3.1.3) breaks the tests of this package:

<cut>
test_pytest_catchlog.py::test_record_tuples PASSED
test_pytest_catchlog.py::test_compat_camel_case_aliases FAILED

=================================== FAILURES ===================================
________________________ test_compat_camel_case_aliases ________________________

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

    def test_compat_camel_case_aliases(testdir):
        testdir.makepyfile('''
            import logging
    
            def test_foo(caplog):
                caplog.setLevel(logging.INFO)
                logging.getLogger().debug('boo!')
    
                with caplog.atLevel(logging.WARNING):
                    logging.getLogger().info('catch me if you can')
            ''')
        result = testdir.runpytest()
        assert result.ret == 0
    
        py.test.raises(Exception, result.stdout.fnmatch_lines,
                       ['*- Captured *log call -*'])
    
        result = testdir.runpytest('-rw')
        assert result.ret == 0
        result.stdout.fnmatch_lines('''
            =*warning summary*=
            *WL1*test_compat_camel_case_aliases*caplog.setLevel()*deprecated*
            *WL1*test_compat_camel_case_aliases*caplog.atLevel()*deprecated*
>       ''')
E       Failed: nomatch: '=*warning summary*='
E           and: u'============================= test session starts =============================='
E           and: u'platform linux2 -- Python 2.7.13, pytest-3.1.3, py-1.4.34, pluggy-0.4.0'
E           and: u'rootdir: /tmp/pytest-of-aham/pytest-0/testdir/test_compat_camel_case_aliases0, inifile:'
E           and: u'plugins: catchlog-1.2.2'
E           and: u'collected 1 item'
E           and: u''
E           and: u'test_compat_camel_case_aliases.py .'
E           and: u''
E           and: u'=============================== warnings summary ==============================='
E           and: u'test_compat_camel_case_aliases.py::test_foo'
E           and: u"  'caplog.setLevel()' is deprecated, use 'caplog.set_level()' instead"
E           and: u"  'caplog.atLevel()' is deprecated, use 'caplog.at_level()' instead"
E           and: u''
E           and: u'-- Docs: http://doc.pytest.org/en/latest/warnings.html'
E           and: u'===================== 1 passed, 2 warnings in 0.00 seconds ====================='
E           and: u''
E       remains unmatched: '=*warning summary*='

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

test_compat_camel_case_aliases.py .

=============================== warnings summary ===============================
test_compat_camel_case_aliases.py::test_foo
  'caplog.setLevel()' is deprecated, use 'caplog.set_level()' instead
  'caplog.atLevel()' is deprecated, use 'caplog.at_level()' instead

-- Docs: http://doc.pytest.org/en/latest/warnings.html
===================== 1 passed, 2 warnings in 0.01 seconds =====================
============================= test session starts ==============================
platform linux2 -- Python 2.7.13, pytest-3.1.3, py-1.4.34, pluggy-0.4.0
rootdir: /tmp/pytest-of-aham/pytest-0/testdir/test_compat_camel_case_aliases0, inifile:
plugins: catchlog-1.2.2
collected 1 item

test_compat_camel_case_aliases.py .

=============================== warnings summary ===============================
test_compat_camel_case_aliases.py::test_foo
  'caplog.setLevel()' is deprecated, use 'caplog.set_level()' instead
  'caplog.atLevel()' is deprecated, use 'caplog.at_level()' instead

-- Docs: http://doc.pytest.org/en/latest/warnings.html
===================== 1 passed, 2 warnings in 0.00 seconds =====================
------------------------------ Captured log call -------------------------------
test_compat_camel_case_aliases.py    5 DEBUG    boo!
test_compat_camel_case_aliases.py    8 INFO     catch me if you can
test_compat_camel_case_aliases.py    5 DEBUG    boo!
test_compat_camel_case_aliases.py    8 INFO     catch me if you can
!!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!
===================== 1 failed, 10 passed in 0.45 seconds ======================
E: pybuild pybuild:283: test: plugin custom failed with: exit code=2: python2.7 -m pytest -v -x
</cut>

Thanks,
DS

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.5.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), LANGUAGE=de_DE.utf8 (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