[issue10786] unittest.TextTextRunner does not respect redirected stderr

2013-06-28 Thread Sylvain Corlay
Sylvain Corlay added the comment: Hello, It would be great if this modification was also done for Python 2.7. A reason is that IPython redirects stderr. When running unit tests in the IPython console without specifying the stream argument, the errors are printed in the shell. See http://p

[issue10786] unittest.TextTextRunner does not respect redirected stderr

2011-01-03 Thread Michael Foord
Michael Foord added the comment: Thanks Terry. Done. Doc changes committed revision 87679. -- keywords: -patch nosy: -MarkRoddy, terry.reedy resolution: -> accepted stage: needs patch -> committed/rejected status: open -> closed type: feature request -> behavior

[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since the current behavior matches the current doc, "class unittest.TextTestRunner(stream=sys.stderr, descriptions=True, verbosity=1, runnerclass=None, warnings=None) A basic test runner implementation which prints results on standard error. ..." this is a f

[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-30 Thread Michael Foord
Michael Foord added the comment: Committed to py3k in revision 87582. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-30 Thread Mark Roddy
Mark Roddy added the comment: All patches change the default value of stream to None in the constructor, and set it to the current to sys.stderr if the argument is None. Unit tests included to check this behavior. Also, the patch against Python 3.1 adds the Test_TextTestRunner test case to

[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-30 Thread Mark Roddy
Changes by Mark Roddy : Added file: http://bugs.python.org/file20194/py32.patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-30 Thread Mark Roddy
Changes by Mark Roddy : -- keywords: +patch Added file: http://bugs.python.org/file20193/py27.patch ___ Python tracker ___ ___ Python-

[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-28 Thread Michael Foord
Michael Foord added the comment: Actually I can't see a good reason why not to just lookup the *current* sys.stderr at instantiation time instead of binding at import time as is the current behaviour. Patch with tests will make it more likely that this change goes in sooner rather than later

[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-28 Thread Michael Foord
Michael Foord 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 del

[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-28 Thread R. David Murray
Changes by R. David Murray : -- keywords: +easy nosy: +michael.foord versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker ___

[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-27 Thread cooyeah
New submission from cooyeah : The constructor of TextTestRunner class looks like: def __init__(self, stream=sys.stderr, descriptions=1, verbosity=1) Since the default parameter is evaluated only once, if sys.stderr is redirected later, the test would still use the old stderr when it was first i