Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 532944 Details for
Bug 656434
dev-python/pytest-catchlog-1.2.2 : [TEST] E Failed: nomatch: *- Captured stdout call -*
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
dev-python:pytest-catchlog-1.2.2:20180524-055648.log
dev-python:pytest-catchlog-1.2.2:20180524-055648.log (text/plain), 69.24 KB, created by
Toralf Förster
on 2018-05-24 17:13:16 UTC
(
hide
)
Description:
dev-python:pytest-catchlog-1.2.2:20180524-055648.log
Filename:
MIME Type:
Creator:
Toralf Förster
Created:
2018-05-24 17:13:16 UTC
Size:
69.24 KB
patch
obsolete
> * Package: dev-python/pytest-catchlog-1.2.2 > * Repository: gentoo > * Maintainer: python@gentoo.org > * USE: abi_x86_64 amd64 elibc_glibc kernel_linux python_targets_python2_7 python_targets_python3_5 test userland_GNU > * FEATURES: network-sandbox preserve-libs sandbox test userpriv usersandbox >>>> Unpacking source... >>>> Unpacking pytest-catchlog-1.2.2.zip to /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/work >>>> Source unpacked in /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/work >>>> Preparing source in /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/work/pytest-catchlog-1.2.2 ... >>>> Source prepared. >>>> Configuring source in /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/work/pytest-catchlog-1.2.2 ... >>>> Source configured. >>>> Compiling source in /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/work/pytest-catchlog-1.2.2 ... > * python2_7: running distutils-r1_run_phase distutils-r1_python_compile >python2.7 setup.py build >running build >running build_py >copying pytest_catchlog.py -> /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/work/pytest-catchlog-1.2.2-python2_7/lib >warning: build_py: byte-compiling is disabled, skipping. > > * python3_5: running distutils-r1_run_phase distutils-r1_python_compile >python3.5 setup.py build >running build >running build_py >copying pytest_catchlog.py -> /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/work/pytest-catchlog-1.2.2-python3_5/lib >warning: build_py: byte-compiling is disabled, skipping. > >>>> Source compiled. >>>> Test phase: dev-python/pytest-catchlog-1.2.2 > * python2_7: running distutils-r1_run_phase python_test >============================= test session starts ============================== >platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0 -- /usr/bin/python2.7 >cachedir: .pytest_cache >rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/work/pytest-catchlog-1.2.2, inifile: >plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3 >collecting ... collected 14 items > >test_pytest_catchlog.py::test_nothing_logged FAILED [ 7%] >test_pytest_catchlog.py::test_messages_logged FAILED [ 14%] >test_pytest_catchlog.py::test_setup_logging FAILED [ 21%] >test_pytest_catchlog.py::test_teardown_logging FAILED [ 28%] >test_pytest_catchlog.py::test_change_level FAILED [ 35%] >test_pytest_catchlog.py::test_with_statement FAILED [ 42%] >test_pytest_catchlog.py::test_log_access FAILED [ 50%] >test_pytest_catchlog.py::test_unicode FAILED [ 57%] >test_pytest_catchlog.py::test_funcarg_help PASSED [ 64%] >test_pytest_catchlog.py::test_record_tuples FAILED [ 71%] >test_pytest_catchlog.py::test_compat_camel_case_aliases FAILED [ 78%] >test_pytest_catchlog.py::test_compat_properties FAILED [ 85%] >test_pytest_catchlog.py::test_compat_records_modification FAILED [ 92%] >test_pytest_catchlog.py::test_disable_log_capturing FAILED [100%] > >=================================== FAILURES =================================== >_____________________________ test_nothing_logged ______________________________ > >testdir = <Testdir local('/var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/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 -*']) > >../../../../work/pytest-catchlog-1.2.2/test_pytest_catchlog.py:27: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <_pytest.pytester.LineMatcher object at 0x7f4668226350> >lines2 = ['*- Captured *log call -*'] > > def fnmatch_lines(self, lines2): > """Search captured text for matching lines using ``fnmatch.fnmatch``. > > The argument is a list of lines which have to match and can use glob > wildcards. If they do not match a pytest.fail() is called. The > matches and non-matches are also printed on stdout. > > """ >> self._match_lines(lines2, fnmatch, 'fnmatch') >E Failed: nomatch: '*- Captured stdout call -*' >E and: u'============================= test session starts ==============================' >E and: u'platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0' >E and: u'rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_nothing_logged0, inifile:' >E and: u'plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3' >E and: u'collected 1 item' >E and: u'' >E and: u'test_nothing_logged.py F [100%]' >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.4.1, py-1.5.3, pluggy-0.6.0' >E and: u'rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_nothing_logged0, inifile:' >E and: u'plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3' >E and: u'collected 1 item' >E and: u'' >E and: u'test_nothing_logged.py F [100%]' >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.4.1, py-1.5.3, pluggy-0.6.0' >E and: u'rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_nothing_logged0, inifile:' >E and: u'plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3' >E and: u'collected 1 item' >E and: u'' >E and: u'test_nothing_logged.py F [100%]' >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'=============================== warnings summary ===============================' >E and: u'None' >E and: u' pytest-catchlog plugin has been merged into the core, please remove it from your requirements.' >E and: u' pytest-catchlog plugin has been merged into the core, please remove it from your requirements.' >E and: u'' >E and: u'-- Docs: http://doc.pytest.org/en/latest/warnings.html' >E and: u'===================== 1 failed, 2 warnings in 0.08 seconds =====================' >E and: u'' >E remains unmatched: '*- Captured *log call -*' > >/usr/lib64/python2.7/site-packages/_pytest/pytester.py:1175: Failed >----------------------------- Captured stdout call ----------------------------- >============================= test session starts ============================== >platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0 >rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_nothing_logged0, inifile: >plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3 >collected 1 item > >test_nothing_logged.py F [100%] > >=================================== 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 >=============================== warnings summary =============================== >None > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > >-- Docs: http://doc.pytest.org/en/latest/warnings.html >===================== 1 failed, 2 warnings in 0.08 seconds ===================== >_____________________________ test_messages_logged _____________________________ > >testdir = <Testdir local('/var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_messages_logged0')> > > def test_messages_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') > logging.getLogger().info('text going to logger') > assert False > ''') > result = testdir.runpytest() > assert result.ret == 1 > result.stdout.fnmatch_lines(['*- Captured *log call -*', >> '*text going to logger*']) > >../../../../work/pytest-catchlog-1.2.2/test_pytest_catchlog.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <_pytest.pytester.LineMatcher object at 0x7f46681dd110> >lines2 = ['*- Captured *log call -*', '*text going to logger*'] > > def fnmatch_lines(self, lines2): > """Search captured text for matching lines using ``fnmatch.fnmatch``. > > The argument is a list of lines which have to match and can use glob > wildcards. If they do not match a pytest.fail() is called. The > matches and non-matches are also printed on stdout. > > """ >> self._match_lines(lines2, fnmatch, 'fnmatch') >E Failed: nomatch: '*- Captured *log call -*' >E and: u'============================= test session starts ==============================' >E and: u'platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0' >E and: u'rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_messages_logged0, inifile:' >E and: u'plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3' >E and: u'collected 1 item' >E and: u'' >E and: u'test_messages_logged.py F [100%]' >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" logging.getLogger().info('text going to logger')" >E and: u'> assert False' >E and: u'E assert False' >E and: u'' >E and: u'test_messages_logged.py:8: 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'=============================== warnings summary ===============================' >E and: u'None' >E and: u' pytest-catchlog plugin has been merged into the core, please remove it from your requirements.' >E and: u' pytest-catchlog plugin has been merged into the core, please remove it from your requirements.' >E and: u'' >E and: u'-- Docs: http://doc.pytest.org/en/latest/warnings.html' >E and: u'===================== 1 failed, 2 warnings in 0.02 seconds =====================' >E and: u'' >E remains unmatched: '*- Captured *log call -*' > >/usr/lib64/python2.7/site-packages/_pytest/pytester.py:1175: Failed >----------------------------- Captured stdout call ----------------------------- >============================= test session starts ============================== >platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0 >rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_messages_logged0, inifile: >plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3 >collected 1 item > >test_messages_logged.py F [100%] > >=================================== FAILURES =================================== >___________________________________ test_foo ___________________________________ > > def test_foo(): > sys.stdout.write('text going to stdout') > sys.stderr.write('text going to stderr') > logging.getLogger().info('text going to logger') >> assert False >E assert False > >test_messages_logged.py:8: AssertionError >----------------------------- Captured stdout call ----------------------------- >text going to stdout >----------------------------- Captured stderr call ----------------------------- >text going to stderr >=============================== warnings summary =============================== >None > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > >-- Docs: http://doc.pytest.org/en/latest/warnings.html >===================== 1 failed, 2 warnings in 0.02 seconds ===================== >______________________________ test_setup_logging ______________________________ > >testdir = <Testdir local('/var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_setup_logging0')> > > def test_setup_logging(testdir): > testdir.makepyfile(''' > import sys > import logging > > def setup_function(function): > logging.getLogger().info('text going to logger from setup') > > def test_foo(): > logging.getLogger().info('text going to logger from call') > assert False > ''') > result = testdir.runpytest() > assert result.ret == 1 > result.stdout.fnmatch_lines(['*- Captured *log setup -*', > '*text going to logger from setup*', > '*- Captured *log call -*', >> '*text going to logger from call*']) > >../../../../work/pytest-catchlog-1.2.2/test_pytest_catchlog.py:68: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <_pytest.pytester.LineMatcher object at 0x7f46680a1310> >lines2 = ['*- Captured *log setup -*', '*text going to logger from setup*', '*- Captured *log call -*', '*text going to logger from call*'] > > def fnmatch_lines(self, lines2): > """Search captured text for matching lines using ``fnmatch.fnmatch``. > > The argument is a list of lines which have to match and can use glob > wildcards. If they do not match a pytest.fail() is called. The > matches and non-matches are also printed on stdout. > > """ >> self._match_lines(lines2, fnmatch, 'fnmatch') >E Failed: nomatch: '*- Captured *log setup -*' >E and: u'============================= test session starts ==============================' >E and: u'platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0' >E and: u'rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_setup_logging0, inifile:' >E and: u'plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3' >E and: u'collected 1 item' >E and: u'' >E and: u'test_setup_logging.py F [100%]' >E and: u'' >E and: u'=================================== FAILURES ===================================' >E and: u'___________________________________ test_foo ___________________________________' >E and: u'' >E and: u' def test_foo():' >E and: u" logging.getLogger().info('text going to logger from call')" >E and: u'> assert False' >E and: u'E assert False' >E and: u'' >E and: u'test_setup_logging.py:9: AssertionError' >E and: u'=============================== warnings summary ===============================' >E and: u'None' >E and: u' pytest-catchlog plugin has been merged into the core, please remove it from your requirements.' >E and: u' pytest-catchlog plugin has been merged into the core, please remove it from your requirements.' >E and: u'' >E and: u'-- Docs: http://doc.pytest.org/en/latest/warnings.html' >E and: u'===================== 1 failed, 2 warnings in 0.02 seconds =====================' >E and: u'' >E remains unmatched: '*- Captured *log setup -*' > >/usr/lib64/python2.7/site-packages/_pytest/pytester.py:1175: Failed >----------------------------- Captured stdout call ----------------------------- >============================= test session starts ============================== >platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0 >rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_setup_logging0, inifile: >plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3 >collected 1 item > >test_setup_logging.py F [100%] > >=================================== FAILURES =================================== >___________________________________ test_foo ___________________________________ > > def test_foo(): > logging.getLogger().info('text going to logger from call') >> assert False >E assert False > >test_setup_logging.py:9: AssertionError >=============================== warnings summary =============================== >None > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > >-- Docs: http://doc.pytest.org/en/latest/warnings.html >===================== 1 failed, 2 warnings in 0.02 seconds ===================== >____________________________ test_teardown_logging _____________________________ > >testdir = <Testdir local('/var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_teardown_logging0')> > > def test_teardown_logging(testdir): > testdir.makepyfile(''' > import sys > import logging > > def test_foo(): > logging.getLogger().info('text going to logger from call') > > def teardown_function(function): > logging.getLogger().info('text going to logger from teardown') > assert False > ''') > result = testdir.runpytest() > assert result.ret == 1 > result.stdout.fnmatch_lines(['*- Captured *log call -*', > '*text going to logger from call*', > '*- Captured *log teardown -*', >> '*text going to logger from teardown*']) > >../../../../work/pytest-catchlog-1.2.2/test_pytest_catchlog.py:88: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <_pytest.pytester.LineMatcher object at 0x7f4667fe35d0> >lines2 = ['*- Captured *log call -*', '*text going to logger from call*', '*- Captured *log teardown -*', '*text going to logger from teardown*'] > > def fnmatch_lines(self, lines2): > """Search captured text for matching lines using ``fnmatch.fnmatch``. > > The argument is a list of lines which have to match and can use glob > wildcards. If they do not match a pytest.fail() is called. The > matches and non-matches are also printed on stdout. > > """ >> self._match_lines(lines2, fnmatch, 'fnmatch') >E Failed: nomatch: '*- Captured *log call -*' >E and: u'============================= test session starts ==============================' >E and: u'platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0' >E and: u'rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_teardown_logging0, inifile:' >E and: u'plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3' >E and: u'collected 1 item' >E and: u'' >E and: u'test_teardown_logging.py .E [100%]' >E and: u'' >E and: u'==================================== ERRORS ====================================' >E and: u'________________________ ERROR at teardown of test_foo _________________________' >E and: u'' >E and: u'function = <function test_foo at 0x7f46681ffd70>' >E and: u'' >E and: u' def teardown_function(function):' >E and: u" logging.getLogger().info('text going to logger from teardown')" >E and: u'> assert False' >E and: u'E assert False' >E and: u'' >E and: u'test_teardown_logging.py:9: AssertionError' >E and: u'=============================== warnings summary ===============================' >E and: u'None' >E and: u' pytest-catchlog plugin has been merged into the core, please remove it from your requirements.' >E and: u' pytest-catchlog plugin has been merged into the core, please remove it from your requirements.' >E and: u'' >E and: u'-- Docs: http://doc.pytest.org/en/latest/warnings.html' >E and: u'================ 1 passed, 2 warnings, 1 error in 0.02 seconds =================' >E and: u'' >E remains unmatched: '*- Captured *log call -*' > >/usr/lib64/python2.7/site-packages/_pytest/pytester.py:1175: Failed >----------------------------- Captured stdout call ----------------------------- >============================= test session starts ============================== >platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0 >rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_teardown_logging0, inifile: >plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3 >collected 1 item > >test_teardown_logging.py .E [100%] > >==================================== ERRORS ==================================== >________________________ ERROR at teardown of test_foo _________________________ > >function = <function test_foo at 0x7f46681ffd70> > > def teardown_function(function): > logging.getLogger().info('text going to logger from teardown') >> assert False >E assert False > >test_teardown_logging.py:9: AssertionError >=============================== warnings summary =============================== >None > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > >-- Docs: http://doc.pytest.org/en/latest/warnings.html >================ 1 passed, 2 warnings, 1 error in 0.02 seconds ================= >______________________________ test_change_level _______________________________ > >testdir = <Testdir local('/var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_change_level0')> > > def test_change_level(testdir): > testdir.makepyfile(''' > import sys > import logging > > def test_foo(caplog): > caplog.set_level(logging.INFO) > log = logging.getLogger() > log.debug('handler DEBUG level') > log.info('handler INFO level') > > caplog.set_level(logging.CRITICAL, logger='root.baz') > log = logging.getLogger('root.baz') > log.warning('logger WARNING level') > log.critical('logger CRITICAL level') > > assert False > ''') > result = testdir.runpytest() > assert result.ret == 1 > result.stdout.fnmatch_lines(['*- Captured *log call -*', > '*handler INFO level*', > '*logger CRITICAL level*']) > py.test.raises(Exception, result.stdout.fnmatch_lines, >> ['*- Captured *log call -*', '*handler DEBUG level*']) > >../../../../work/pytest-catchlog-1.2.2/test_pytest_catchlog.py:115: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <_pytest.pytester.LineMatcher object at 0x7f4667f67c90> >lines2 = ['*- Captured *log call -*', '*handler DEBUG level*'] > > def fnmatch_lines(self, lines2): > """Search captured text for matching lines using ``fnmatch.fnmatch``. > > The argument is a list of lines which have to match and can use glob > wildcards. If they do not match a pytest.fail() is called. The > matches and non-matches are also printed on stdout. > > """ >> self._match_lines(lines2, fnmatch, 'fnmatch') >E Failed: nomatch: '*- Captured *log call -*' >E and: u'============================= test session starts ==============================' >E and: u'platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0' >E and: u'rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_change_level0, inifile:' >E and: u'plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3' >E and: u'collected 1 item' >E and: u'' >E and: u'test_change_level.py F [100%]' >E and: u'' >E and: u'=================================== FAILURES ===================================' >E and: u'___________________________________ test_foo ___________________________________' >E and: u'' >E and: u'caplog = <_pytest.logging.LogCaptureFixture object at 0x7f4667f79b50>' >E and: u'' >E and: u' def test_foo(caplog):' >E and: u' caplog.set_level(logging.INFO)' >E and: u' log = logging.getLogger()' >E and: u" log.debug('handler DEBUG level')" >E and: u" log.info('handler INFO level')" >E and: u' ' >E and: u" caplog.set_level(logging.CRITICAL, logger='root.baz')" >E and: u" log = logging.getLogger('root.baz')" >E and: u" log.warning('logger WARNING level')" >E and: u" log.critical('logger CRITICAL level')" >E and: u' ' >E and: u'> assert False' >E and: u'E assert False' >E and: u'' >E and: u'test_change_level.py:15: AssertionError' >E fnmatch: '*- Captured *log call -*' >E with: u'------------------------------ Captured log call -------------------------------' >E fnmatch: '*handler INFO level*' >E with: u'test_change_level.py 8 INFO handler INFO level' >E fnmatch: '*logger CRITICAL level*' >E with: u'test_change_level.py 13 CRITICAL logger CRITICAL level' >E nomatch: '*- Captured *log call -*' >E and: u'============================= test session starts ==============================' >E and: u'platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0' >E and: u'rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_change_level0, inifile:' >E and: u'plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3' >E and: u'collected 1 item' >E and: u'' >E and: u'test_change_level.py F [100%]' >E and: u'' >E and: u'=================================== FAILURES ===================================' >E and: u'___________________________________ test_foo ___________________________________' >E and: u'' >E and: u'caplog = <_pytest.logging.LogCaptureFixture object at 0x7f4667f79b50>' >E and: u'' >E and: u' def test_foo(caplog):' >E and: u' caplog.set_level(logging.INFO)' >E and: u' log = logging.getLogger()' >E and: u" log.debug('handler DEBUG level')" >E and: u" log.info('handler INFO level')" >E and: u' ' >E and: u" caplog.set_level(logging.CRITICAL, logger='root.baz')" >E and: u" log = logging.getLogger('root.baz')" >E and: u" log.warning('logger WARNING level')" >E and: u" log.critical('logger CRITICAL level')" >E and: u' ' >E and: u'> assert False' >E and: u'E assert False' >E and: u'' >E and: u'test_change_level.py:15: AssertionError' >E fnmatch: '*- Captured *log call -*' >E with: u'------------------------------ Captured log call -------------------------------' >E nomatch: '*handler DEBUG level*' >E and: u'test_change_level.py 8 INFO handler INFO level' >E and: u'test_change_level.py 13 CRITICAL logger CRITICAL level' >E and: u'=============================== warnings summary ===============================' >E and: u'None' >E and: u' pytest-catchlog plugin has been merged into the core, please remove it from your requirements.' >E and: u' pytest-catchlog plugin has been merged into the core, please remove it from your requirements.' >E and: u'' >E and: u'-- Docs: http://doc.pytest.org/en/latest/warnings.html' >E and: u'===================== 1 failed, 2 warnings in 0.02 seconds =====================' >E and: u'' >E remains unmatched: '*handler DEBUG level*' > >/usr/lib64/python2.7/site-packages/_pytest/pytester.py:1175: Failed >----------------------------- Captured stdout call ----------------------------- >============================= test session starts ============================== >platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0 >rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_change_level0, inifile: >plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3 >collected 1 item > >test_change_level.py F [100%] > >=================================== FAILURES =================================== >___________________________________ test_foo ___________________________________ > >caplog = <_pytest.logging.LogCaptureFixture object at 0x7f4667f79b50> > > def test_foo(caplog): > caplog.set_level(logging.INFO) > log = logging.getLogger() > log.debug('handler DEBUG level') > log.info('handler INFO level') > > caplog.set_level(logging.CRITICAL, logger='root.baz') > log = logging.getLogger('root.baz') > log.warning('logger WARNING level') > log.critical('logger CRITICAL level') > >> assert False >E assert False > >test_change_level.py:15: AssertionError >------------------------------ Captured log call ------------------------------- >test_change_level.py 8 INFO handler INFO level >test_change_level.py 13 CRITICAL logger CRITICAL level >=============================== warnings summary =============================== >None > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > >-- Docs: http://doc.pytest.org/en/latest/warnings.html >===================== 1 failed, 2 warnings in 0.02 seconds ===================== >------------------------------ Captured log call ------------------------------- >test_change_level.py 8 INFO handler INFO level >test_change_level.py 13 CRITICAL logger CRITICAL level >_____________________________ test_with_statement ______________________________ > >testdir = <Testdir local('/var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_with_statement0')> > > @py.test.mark.skipif('sys.version_info < (2,5)') > def test_with_statement(testdir): > testdir.makepyfile(''' > from __future__ import with_statement > import sys > import logging > > def test_foo(caplog): > with caplog.at_level(logging.INFO): > log = logging.getLogger() > log.debug('handler DEBUG level') > log.info('handler INFO level') > > with caplog.at_level(logging.CRITICAL, logger='root.baz'): > log = logging.getLogger('root.baz') > log.warning('logger WARNING level') > log.critical('logger CRITICAL level') > > assert False > ''') > result = testdir.runpytest() > assert result.ret == 1 > result.stdout.fnmatch_lines(['*- Captured *log call -*', > '*handler INFO level*', > '*logger CRITICAL level*']) > py.test.raises(Exception, result.stdout.fnmatch_lines, >> ['*- Captured *log call -*', '*handler DEBUG level*']) > >../../../../work/pytest-catchlog-1.2.2/test_pytest_catchlog.py:146: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <_pytest.pytester.LineMatcher object at 0x7f4667ee8990> >lines2 = ['*- Captured *log call -*', '*handler DEBUG level*'] > > def fnmatch_lines(self, lines2): > """Search captured text for matching lines using ``fnmatch.fnmatch``. > > The argument is a list of lines which have to match and can use glob > wildcards. If they do not match a pytest.fail() is called. The > matches and non-matches are also printed on stdout. > > """ >> self._match_lines(lines2, fnmatch, 'fnmatch') >E Failed: nomatch: '*- Captured *log call -*' >E and: u'============================= test session starts ==============================' >E and: u'platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0' >E and: u'rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_with_statement0, inifile:' >E and: u'plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3' >E and: u'collected 1 item' >E and: u'' >E and: u'test_with_statement.py F [100%]' >E and: u'' >E and: u'=================================== FAILURES ===================================' >E and: u'___________________________________ test_foo ___________________________________' >E and: u'' >E and: u'caplog = <_pytest.logging.LogCaptureFixture object at 0x7f4667f02590>' >E and: u'' >E and: u' def test_foo(caplog):' >E and: u' with caplog.at_level(logging.INFO):' >E and: u' log = logging.getLogger()' >E and: u" log.debug('handler DEBUG level')" >E and: u" log.info('handler INFO level')" >E and: u' ' >E and: u" with caplog.at_level(logging.CRITICAL, logger='root.baz'):" >E and: u" log = logging.getLogger('root.baz')" >E and: u" log.warning('logger WARNING level')" >E and: u" log.critical('logger CRITICAL level')" >E and: u' ' >E and: u'> assert False' >E and: u'E assert False' >E and: u'' >E and: u'test_with_statement.py:16: AssertionError' >E fnmatch: '*- Captured *log call -*' >E with: u'------------------------------ Captured log call -------------------------------' >E fnmatch: '*handler INFO level*' >E with: u'test_with_statement.py 9 INFO handler INFO level' >E fnmatch: '*logger CRITICAL level*' >E with: u'test_with_statement.py 14 CRITICAL logger CRITICAL level' >E nomatch: '*- Captured *log call -*' >E and: u'============================= test session starts ==============================' >E and: u'platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0' >E and: u'rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_with_statement0, inifile:' >E and: u'plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3' >E and: u'collected 1 item' >E and: u'' >E and: u'test_with_statement.py F [100%]' >E and: u'' >E and: u'=================================== FAILURES ===================================' >E and: u'___________________________________ test_foo ___________________________________' >E and: u'' >E and: u'caplog = <_pytest.logging.LogCaptureFixture object at 0x7f4667f02590>' >E and: u'' >E and: u' def test_foo(caplog):' >E and: u' with caplog.at_level(logging.INFO):' >E and: u' log = logging.getLogger()' >E and: u" log.debug('handler DEBUG level')" >E and: u" log.info('handler INFO level')" >E and: u' ' >E and: u" with caplog.at_level(logging.CRITICAL, logger='root.baz'):" >E and: u" log = logging.getLogger('root.baz')" >E and: u" log.warning('logger WARNING level')" >E and: u" log.critical('logger CRITICAL level')" >E and: u' ' >E and: u'> assert False' >E and: u'E assert False' >E and: u'' >E and: u'test_with_statement.py:16: AssertionError' >E fnmatch: '*- Captured *log call -*' >E with: u'------------------------------ Captured log call -------------------------------' >E nomatch: '*handler DEBUG level*' >E and: u'test_with_statement.py 9 INFO handler INFO level' >E and: u'test_with_statement.py 14 CRITICAL logger CRITICAL level' >E and: u'=============================== warnings summary ===============================' >E and: u'None' >E and: u' pytest-catchlog plugin has been merged into the core, please remove it from your requirements.' >E and: u' pytest-catchlog plugin has been merged into the core, please remove it from your requirements.' >E and: u'' >E and: u'-- Docs: http://doc.pytest.org/en/latest/warnings.html' >E and: u'===================== 1 failed, 2 warnings in 0.02 seconds =====================' >E and: u'' >E remains unmatched: '*handler DEBUG level*' > >/usr/lib64/python2.7/site-packages/_pytest/pytester.py:1175: Failed >----------------------------- Captured stdout call ----------------------------- >============================= test session starts ============================== >platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0 >rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_with_statement0, inifile: >plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3 >collected 1 item > >test_with_statement.py F [100%] > >=================================== FAILURES =================================== >___________________________________ test_foo ___________________________________ > >caplog = <_pytest.logging.LogCaptureFixture object at 0x7f4667f02590> > > def test_foo(caplog): > with caplog.at_level(logging.INFO): > log = logging.getLogger() > log.debug('handler DEBUG level') > log.info('handler INFO level') > > with caplog.at_level(logging.CRITICAL, logger='root.baz'): > log = logging.getLogger('root.baz') > log.warning('logger WARNING level') > log.critical('logger CRITICAL level') > >> assert False >E assert False > >test_with_statement.py:16: AssertionError >------------------------------ Captured log call ------------------------------- >test_with_statement.py 9 INFO handler INFO level >test_with_statement.py 14 CRITICAL logger CRITICAL level >=============================== warnings summary =============================== >None > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > >-- Docs: http://doc.pytest.org/en/latest/warnings.html >===================== 1 failed, 2 warnings in 0.02 seconds ===================== >------------------------------ Captured log call ------------------------------- >test_with_statement.py 9 INFO handler INFO level >test_with_statement.py 14 CRITICAL logger CRITICAL level >_______________________________ test_log_access ________________________________ > >testdir = <Testdir local('/var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_log_access0')> > > def test_log_access(testdir): > testdir.makepyfile(''' > import sys > import logging > > def test_foo(caplog): > logging.getLogger().info('boo %s', 'arg') > assert caplog.records[0].levelname == 'INFO' > assert caplog.records[0].msg == 'boo %s' > assert 'boo arg' in caplog.text > ''') > result = testdir.runpytest() >> assert result.ret == 0 >E assert 1 == 0 >E + where 1 = <_pytest.pytester.RunResult object at 0x7f4667e9c850>.ret > >../../../../work/pytest-catchlog-1.2.2/test_pytest_catchlog.py:163: AssertionError >----------------------------- Captured stdout call ----------------------------- >============================= test session starts ============================== >platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0 >rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_log_access0, inifile: >plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3 >collected 1 item > >test_log_access.py F [100%] > >=================================== FAILURES =================================== >___________________________________ test_foo ___________________________________ > >caplog = <_pytest.logging.LogCaptureFixture object at 0x7f4667eaa0d0> > > def test_foo(caplog): > logging.getLogger().info('boo %s', 'arg') >> assert caplog.records[0].levelname == 'INFO' >E IndexError: list index out of range > >test_log_access.py:6: IndexError >=============================== warnings summary =============================== >None > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > >-- Docs: http://doc.pytest.org/en/latest/warnings.html >===================== 1 failed, 2 warnings in 0.02 seconds ===================== >_________________________________ test_unicode _________________________________ > >testdir = <Testdir local('/var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_unicode0')> > > def test_unicode(testdir): > u = lambda x: x.decode('utf-8') if sys.version_info < (3,) else x > testdir.makepyfile(u(''' > # coding: utf-8 > > import sys > import logging > > u = lambda x: x.decode('utf-8') if sys.version_info < (3,) else x > > def test_foo(caplog): > logging.getLogger().info(u('bū')) > assert caplog.records[0].levelname == 'INFO' > assert caplog.records[0].msg == u('bū') > assert u('bū') in caplog.text > ''')) > result = testdir.runpytest() >> assert result.ret == 0 >E assert 1 == 0 >E + where 1 = <_pytest.pytester.RunResult object at 0x7f4667f9b590>.ret > >../../../../work/pytest-catchlog-1.2.2/test_pytest_catchlog.py:183: AssertionError >----------------------------- Captured stdout call ----------------------------- >============================= test session starts ==============================\nplatform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0\nrootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_unicode0, inifile:\nplugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3\ncollected 1 item\n\ntest_unicode.py F [100%]\n\n=================================== FAILURES ===================================\n___________________________________ test_foo ___________________________________\n\ncaplog = <_pytest.logging.LogCaptureFixture object at 0x7f4667fc44d0>\n\n def test_foo(caplog):\n logging.getLogger().info(u('b\u016b'))\n> assert caplog.records[0].levelname == 'INFO'\nE IndexError: list index out of range\n\ntest_unicode.py:10: IndexError\n=============================== warnings summary ===============================\nNone\n pytest-catchlog plugin has been merged into the core, please remove it from your requirements.\n pytest-catchlog plugin has been merged into the core, please remove it from your requirements.\n\n-- Docs: http://doc.pytest.org/en/latest/warnings.html\n===================== 1 failed, 2 warnings in 0.03 seconds ===================== >______________________________ test_record_tuples ______________________________ > >testdir = <Testdir local('/var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_record_tuples0')> > > def test_record_tuples(testdir): > testdir.makepyfile(''' > import sys > import logging > > def test_foo(caplog): > logging.getLogger().info('boo %s', 'arg') > > assert caplog.record_tuples == [ > ('root', logging.INFO, 'boo arg'), > ] > ''') > result = testdir.runpytest() >> assert result.ret == 0 >E assert 1 == 0 >E + where 1 = <_pytest.pytester.RunResult object at 0x7f4667e562d0>.ret > >../../../../work/pytest-catchlog-1.2.2/test_pytest_catchlog.py:204: AssertionError >----------------------------- Captured stdout call ----------------------------- >============================= test session starts ============================== >platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0 >rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_record_tuples0, inifile: >plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3 >collected 1 item > >test_record_tuples.py F [100%] > >=================================== FAILURES =================================== >___________________________________ test_foo ___________________________________ > >caplog = <_pytest.logging.LogCaptureFixture object at 0x7f4667e56ad0> > > def test_foo(caplog): > logging.getLogger().info('boo %s', 'arg') > >> assert caplog.record_tuples == [ > ('root', logging.INFO, 'boo arg'), > ] >E AssertionError: assert [] == [('root', 20, 'boo arg')] >E Right contains more items, first extra item: ('root', 20, 'boo arg') >E Use -v to get the full diff > >test_record_tuples.py:7: AssertionError >=============================== warnings summary =============================== >None > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > >-- Docs: http://doc.pytest.org/en/latest/warnings.html >===================== 1 failed, 2 warnings in 0.02 seconds ===================== >________________________ test_compat_camel_case_aliases ________________________ > >testdir = <Testdir local('/var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/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 >E assert 1 == 0 >E + where 1 = <_pytest.pytester.RunResult object at 0x7f4667fc40d0>.ret > >../../../../work/pytest-catchlog-1.2.2/test_pytest_catchlog.py:219: AssertionError >----------------------------- Captured stdout call ----------------------------- >============================= test session starts ============================== >platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0 >rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_compat_camel_case_aliases0, inifile: >plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3 >collected 1 item > >test_compat_camel_case_aliases.py F [100%] > >=================================== FAILURES =================================== >___________________________________ test_foo ___________________________________ > >caplog = <_pytest.logging.LogCaptureFixture object at 0x7f4667ecb910> > > def test_foo(caplog): >> caplog.setLevel(logging.INFO) >E AttributeError: 'LogCaptureFixture' object has no attribute 'setLevel' > >test_compat_camel_case_aliases.py:4: AttributeError >=============================== warnings summary =============================== >None > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > >-- Docs: http://doc.pytest.org/en/latest/warnings.html >===================== 1 failed, 2 warnings in 0.02 seconds ===================== >____________________________ test_compat_properties ____________________________ > >testdir = <Testdir local('/var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_compat_properties0')> > > def test_compat_properties(testdir): > testdir.makepyfile(''' > import logging > > def test_foo(caplog): > logging.getLogger().info('boo %s', 'arg') > > assert caplog.text == caplog.text() == str(caplog.text) > assert caplog.records == caplog.records() == list(caplog.records) > assert (caplog.record_tuples == > caplog.record_tuples() == list(caplog.record_tuples)) > ''') > result = testdir.runpytest() >> assert result.ret == 0 >E assert 1 == 0 >E + where 1 = <_pytest.pytester.RunResult object at 0x7f4667f67190>.ret > >../../../../work/pytest-catchlog-1.2.2/test_pytest_catchlog.py:246: AssertionError >----------------------------- Captured stdout call ----------------------------- >============================= test session starts ============================== >platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0 >rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_compat_properties0, inifile: >plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3 >collected 1 item > >test_compat_properties.py F [100%] > >=================================== FAILURES =================================== >___________________________________ test_foo ___________________________________ > >caplog = <_pytest.logging.LogCaptureFixture object at 0x7f466815c610> > > def test_foo(caplog): > logging.getLogger().info('boo %s', 'arg') > >> assert caplog.text == caplog.text() == str(caplog.text) >E TypeError: 'unicode' object is not callable > >test_compat_properties.py:6: TypeError >=============================== warnings summary =============================== >None > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > >-- Docs: http://doc.pytest.org/en/latest/warnings.html >===================== 1 failed, 2 warnings in 0.03 seconds ===================== >_______________________ test_compat_records_modification _______________________ > >testdir = <Testdir local('/var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_compat_records_modification0')> > > def test_compat_records_modification(testdir): > testdir.makepyfile(''' > import logging > > logger = logging.getLogger() > > def test_foo(caplog): > logger.info('boo %s', 'arg') > assert caplog.records > assert caplog.records() > > del caplog.records()[:] # legacy syntax > assert not caplog.records > assert not caplog.records() > > logger.info('foo %s', 'arg') > assert caplog.records > assert caplog.records() > ''') > result = testdir.runpytest() >> assert result.ret == 0 >E assert 1 == 0 >E + where 1 = <_pytest.pytester.RunResult object at 0x7f4668579a50>.ret > >../../../../work/pytest-catchlog-1.2.2/test_pytest_catchlog.py:278: AssertionError >----------------------------- Captured stdout call ----------------------------- >============================= test session starts ============================== >platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0 >rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_compat_records_modification0, inifile: >plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3 >collected 1 item > >test_compat_records_modification.py F [100%] > >=================================== FAILURES =================================== >___________________________________ test_foo ___________________________________ > >caplog = <_pytest.logging.LogCaptureFixture object at 0x7f466828af50> > > def test_foo(caplog): > logger.info('boo %s', 'arg') >> assert caplog.records >E assert [] >E + where [] = <_pytest.logging.LogCaptureFixture object at 0x7f466828af50>.records > >test_compat_records_modification.py:7: AssertionError >=============================== warnings summary =============================== >None > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > >-- Docs: http://doc.pytest.org/en/latest/warnings.html >===================== 1 failed, 2 warnings in 0.03 seconds ===================== >__________________________ test_disable_log_capturing __________________________ > >testdir = <Testdir local('/var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_disable_log_capturing0')> > > def test_disable_log_capturing(testdir): > testdir.makepyfile(''' > import sys > import logging > > def test_foo(caplog): > sys.stdout.write('text going to stdout') > logging.getLogger().warning('catch me if you can!') > sys.stderr.write('text going to stderr') > assert False > ''') > result = testdir.runpytest('--no-print-logs') > print(result.stdout) > 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 -*']) > >../../../../work/pytest-catchlog-1.2.2/test_pytest_catchlog.py:300: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <_pytest.pytester.LineMatcher object at 0x7f466828fc50> >lines2 = ['*- Captured *log call -*'] > > def fnmatch_lines(self, lines2): > """Search captured text for matching lines using ``fnmatch.fnmatch``. > > The argument is a list of lines which have to match and can use glob > wildcards. If they do not match a pytest.fail() is called. The > matches and non-matches are also printed on stdout. > > """ >> self._match_lines(lines2, fnmatch, 'fnmatch') >E Failed: nomatch: '*- Captured stdout call -*' >E and: u'============================= test session starts ==============================' >E and: u'platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0' >E and: u'rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_disable_log_capturing0, inifile:' >E and: u'plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3' >E and: u'collected 1 item' >E and: u'' >E and: u'test_disable_log_capturing.py F [100%]' >E and: u'' >E and: u'=================================== FAILURES ===================================' >E and: u'___________________________________ test_foo ___________________________________' >E and: u'' >E and: u'caplog = <_pytest.logging.LogCaptureFixture object at 0x7f4668226a50>' >E and: u'' >E and: u' def test_foo(caplog):' >E and: u" sys.stdout.write('text going to stdout')" >E and: u" logging.getLogger().warning('catch me if you can!')" >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_disable_log_capturing.py:8: 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.4.1, py-1.5.3, pluggy-0.6.0' >E and: u'rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_disable_log_capturing0, inifile:' >E and: u'plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3' >E and: u'collected 1 item' >E and: u'' >E and: u'test_disable_log_capturing.py F [100%]' >E and: u'' >E and: u'=================================== FAILURES ===================================' >E and: u'___________________________________ test_foo ___________________________________' >E and: u'' >E and: u'caplog = <_pytest.logging.LogCaptureFixture object at 0x7f4668226a50>' >E and: u'' >E and: u' def test_foo(caplog):' >E and: u" sys.stdout.write('text going to stdout')" >E and: u" logging.getLogger().warning('catch me if you can!')" >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_disable_log_capturing.py:8: 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.4.1, py-1.5.3, pluggy-0.6.0' >E and: u'rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_disable_log_capturing0, inifile:' >E and: u'plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3' >E and: u'collected 1 item' >E and: u'' >E and: u'test_disable_log_capturing.py F [100%]' >E and: u'' >E and: u'=================================== FAILURES ===================================' >E and: u'___________________________________ test_foo ___________________________________' >E and: u'' >E and: u'caplog = <_pytest.logging.LogCaptureFixture object at 0x7f4668226a50>' >E and: u'' >E and: u' def test_foo(caplog):' >E and: u" sys.stdout.write('text going to stdout')" >E and: u" logging.getLogger().warning('catch me if you can!')" >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_disable_log_capturing.py:8: 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'=============================== warnings summary ===============================' >E and: u'None' >E and: u' pytest-catchlog plugin has been merged into the core, please remove it from your requirements.' >E and: u' pytest-catchlog plugin has been merged into the core, please remove it from your requirements.' >E and: u'' >E and: u'-- Docs: http://doc.pytest.org/en/latest/warnings.html' >E and: u'===================== 1 failed, 2 warnings in 0.02 seconds =====================' >E and: u'' >E remains unmatched: '*- Captured *log call -*' > >/usr/lib64/python2.7/site-packages/_pytest/pytester.py:1175: Failed >----------------------------- Captured stdout call ----------------------------- >============================= test session starts ============================== >platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.3, pluggy-0.6.0 >rootdir: /var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/pytest-of-portage/pytest-0/test_disable_log_capturing0, inifile: >plugins: catchlog-1.2.2, hypothesis-3.50.1, backports.unittest-mock-1.3 >collected 1 item > >test_disable_log_capturing.py F [100%] > >=================================== FAILURES =================================== >___________________________________ test_foo ___________________________________ > >caplog = <_pytest.logging.LogCaptureFixture object at 0x7f4668226a50> > > def test_foo(caplog): > sys.stdout.write('text going to stdout') > logging.getLogger().warning('catch me if you can!') > sys.stderr.write('text going to stderr') >> assert False >E assert False > >test_disable_log_capturing.py:8: AssertionError >----------------------------- Captured stdout call ----------------------------- >text going to stdout >----------------------------- Captured stderr call ----------------------------- >text going to stderr >=============================== warnings summary =============================== >None > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > >-- Docs: http://doc.pytest.org/en/latest/warnings.html >===================== 1 failed, 2 warnings in 0.02 seconds ===================== ><_pytest.pytester.LineMatcher object at 0x7f466828fc50> >------------------------------ Captured log call ------------------------------- >test_disable_log_capturing.py 6 WARNING catch me if you can! >=============================== warnings summary =============================== >None > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > pytest-catchlog plugin has been merged into the core, please remove it from your requirements. > >-- Docs: http://doc.pytest.org/en/latest/warnings.html >=============== 13 failed, 1 passed, 2 warnings in 1.94 seconds ================ > * ERROR: dev-python/pytest-catchlog-1.2.2::gentoo failed (test phase): > * (no error message) > * > * Call stack: > * ebuild.sh, line 124: Called src_test > * environment, line 2606: Called distutils-r1_src_test > * environment, line 862: Called _distutils-r1_run_foreach_impl 'python_test' > * environment, line 324: Called python_foreach_impl 'distutils-r1_run_phase' 'python_test' > * environment, line 2141: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' > * environment, line 1516: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' > * environment, line 1514: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_test' > * environment, line 536: Called distutils-r1_run_phase 'python_test' > * environment, line 793: Called python_test > * environment, line 2508: Called die > * The specific snippet of code: > * PYTEST_PLUGINS=${PN/-/_} py.test -v -v test_pytest_catchlog.py || die > * > * If you need support, post the output of `emerge --info '=dev-python/pytest-catchlog-1.2.2::gentoo'`, > * the complete build log and the output of `emerge -pqv '=dev-python/pytest-catchlog-1.2.2::gentoo'`. > * The complete build log is located at '/var/log/portage/dev-python:pytest-catchlog-1.2.2:20180524-055648.log'. > * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/build.log'. > * The ebuild environment file is located at '/var/tmp/portage/dev-python/pytest-catchlog-1.2.2/temp/environment'. > * Working directory: '/var/tmp/portage/dev-python/pytest-catchlog-1.2.2/work/pytest-catchlog-1.2.2' > * S: '/var/tmp/portage/dev-python/pytest-catchlog-1.2.2/work/pytest-catchlog-1.2.2'
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 656434
:
532942
| 532944 |
532946
|
532948
|
532950
|
532952