mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Get rid of the increasingly convoluted global tricks w/ sys.stdout, in
favor of local save/modify/restore. The test suite should run fine again.
This commit is contained in:
parent
5055545fc0
commit
342ca75d95
2 changed files with 12 additions and 28 deletions
|
@ -287,7 +287,7 @@ def runtest(test, generate, verbose, quiet, testdir = None):
|
|||
else:
|
||||
cfp = StringIO.StringIO()
|
||||
try:
|
||||
sys.save_stdout = sys.stdout
|
||||
save_stdout = sys.stdout
|
||||
try:
|
||||
if cfp:
|
||||
sys.stdout = cfp
|
||||
|
@ -301,7 +301,7 @@ def runtest(test, generate, verbose, quiet, testdir = None):
|
|||
if indirect_test is not None:
|
||||
indirect_test()
|
||||
finally:
|
||||
sys.stdout = sys.save_stdout
|
||||
sys.stdout = save_stdout
|
||||
except (ImportError, test_support.TestSkipped), msg:
|
||||
if not quiet:
|
||||
print "test", test, "skipped --", msg
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue