[issue22197] Allow better verbosity / output control in test cases

Ezio Melotti report at bugs.python.org
Fri Sep 26 17:35:02 CEST 2014


Ezio Melotti added the comment:

> As for output buffering, may be replace sys.stdout by file-like object
> which flushes its buffered content to original stdout on failure and
> discard it on success.

This is what the --buffer option is already supposed to do (I only found out about it thanks to this issue, the name is not very indicative of what it does...).  IIUC what Antoine is suggesting is having a more fine-grained control of the buffering, and the ability to set it from individual test cases rather than using a global command line flag or unittest.main(buffer=True) (which is only used while executing the test file directly).

----------

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


More information about the Python-bugs-list mailing list