[issue10786] unittest.TextTextRunner does not respect redirected stderr
Michael Foord
report at bugs.python.org
Tue Dec 28 17:27:51 CET 2010
Michael Foord <michael at voidspace.org.uk> added the comment:
TextTestRunner is initialised with a stream to output messages on that defaults to sys.stderr. The correct way to redirect messages is to construct it with a different stream.
If you want a redirectable stream then construct the runner with a stream that delegates operations to a 'backend stream' but allows you to redirect it.
Fixing TextTestRunner to dynamically lookup up sys.stderr would not be compatible with systems that redirect sys.stderr but *don't* expect this to prevent test run information from being output.
I suggest closing as wontfix.
----------
assignee: -> michael.foord
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10786>
_______________________________________
More information about the Python-bugs-list
mailing list