mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
unittest tests no longer replace the sys.stdout put in place by regrtest
This commit is contained in:
parent
7c63eee485
commit
25d7976014
2 changed files with 4 additions and 8 deletions
|
@ -19,10 +19,6 @@ def failfast(method):
|
|||
return method(self, *args, **kw)
|
||||
return inner
|
||||
|
||||
|
||||
_std_out = sys.stdout
|
||||
_std_err = sys.stderr
|
||||
|
||||
NEWLINE = os.linesep
|
||||
STDOUT_LINE = '%sStdout:%s%%s' % (NEWLINE, NEWLINE)
|
||||
STDERR_LINE = '%sStderr:%s%%s' % (NEWLINE, NEWLINE)
|
||||
|
@ -89,8 +85,8 @@ class TestResult(object):
|
|||
error += NEWLINE
|
||||
self._original_stderr.write(STDERR_LINE % error)
|
||||
|
||||
sys.stdout = _std_out
|
||||
sys.stderr = _std_err
|
||||
sys.stdout = self._original_stdout
|
||||
sys.stderr = self._original_stderr
|
||||
self._stdout_buffer.seek(0)
|
||||
self._stdout_buffer.truncate()
|
||||
self._stderr_buffer.seek(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue