[issue24249] unittest API for detecting test failure in cleanup/teardown

Martin Panter report at bugs.python.org
Thu May 21 01:03:59 CEST 2015


Martin Panter added the comment:

Can’t you use the -b or --buffer command-line option <https://docs.python.org/dev/library/unittest.html#cmdoption-unittest-b>, or equivalent option to unittest.main() or whatever?

The standard output and standard error streams are buffered during the test run. Output during a passing test is discarded. Output is echoed normally on test fail or error and is added to the failure messages.

----------
nosy: +vadmium

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24249>
_______________________________________


More information about the Python-bugs-list mailing list