summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-09-21 20:45:44 (GMT)
committerGuido van Rossum <guido@python.org>2001-09-21 20:45:44 (GMT)
commit0a07639779beb496f3d68021fef28e77dbe13af9 (patch)
tree9bc2788297d521142990aaaaeba65e5e69bf04af /Lib/test/regrtest.py
parent0fcca4e815e3dbb28c73108376079a94ad6ee8de (diff)
downloadcpython-0a07639779beb496f3d68021fef28e77dbe13af9.zip
cpython-0a07639779beb496f3d68021fef28e77dbe13af9.tar.gz
cpython-0a07639779beb496f3d68021fef28e77dbe13af9.tar.bz2
Oops. I didn't expect that some tests (test_cookie) have expected
output *and* doctest stuff. Assuming the doctest stuff comes after the expected output, this fixes that.
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index a69fd41..c8c9167 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -287,7 +287,7 @@ def runtest(test, generate, verbose, quiet, testdir = None):
else:
cfp = StringIO.StringIO()
try:
- save_stdout = sys.stdout
+ sys.save_stdout = sys.stdout
try:
if cfp:
sys.stdout = cfp
@@ -301,14 +301,7 @@ def runtest(test, generate, verbose, quiet, testdir = None):
if indirect_test is not None:
indirect_test()
finally:
- sys.stdout = save_stdout
- if cfp and test_support.output_comparison_denied():
- output = cfp.getvalue()
- cfp = None
- s = test + "\n"
- if output.startswith(s):
- output = output[len(s):]
- sys.stdout.write(output)
+ sys.stdout = sys.save_stdout
except (ImportError, test_support.TestSkipped), msg:
if not quiet:
print "test", test, "skipped --", msg