]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #12400: runtest() truncates the StringIO stream before a new test
authorVictor Stinner <victor.stinner@haypocalc.com>
Wed, 29 Jun 2011 15:26:38 +0000 (17:26 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Wed, 29 Jun 2011 15:26:38 +0000 (17:26 +0200)
Lib/test/regrtest.py

index 75d8795aff944c20274b6cc9904907acac57a30b..f1ef7156103c1368246a8d8bc31dae0d74c6637d 100755 (executable)
@@ -793,6 +793,7 @@ def runtest(test, verbose, quiet,
             if runtest.stringio is None:
                 runtest.stringio = io.StringIO()
             stream = runtest.stringio
+            stream.truncate(0)
 
             orig_stdout = sys.stdout
             orig_stderr = sys.stderr