New submission from cooyeah <cooy...@gmail.com>:

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 initialized.

----------
components: Tests
messages: 124764
nosy: cooyeah
priority: normal
severity: normal
status: open
title: unittest.TextTextRunner does not respect redirected stderr
type: behavior
versions: Python 2.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10786>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to