mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
Issue 10786: unittest.TextTestRunner default stream no longer bound at import time
This commit is contained in:
parent
30baf2b0ed
commit
6f17e2df29
3 changed files with 24 additions and 1 deletions
|
@ -125,8 +125,10 @@ class TextTestRunner(object):
|
|||
"""
|
||||
resultclass = TextTestResult
|
||||
|
||||
def __init__(self, stream=sys.stderr, descriptions=True, verbosity=1,
|
||||
def __init__(self, stream=None, descriptions=True, verbosity=1,
|
||||
failfast=False, buffer=False, resultclass=None, warnings=None):
|
||||
if stream is None:
|
||||
stream = sys.stderr
|
||||
self.stream = _WritelnDecorator(stream)
|
||||
self.descriptions = descriptions
|
||||
self.verbosity = verbosity
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue