From cf807c04a36821ff3288dfd16927d28236e60238 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Wed, 27 Jun 2012 17:41:07 +0200 Subject: [PATCH] Flush stdout and stderr when running tests in parallel (helps getting results in real-time when stdio is transmitted over a pipe or socket) --- Lib/test/regrtest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 75a9bec02ea..f01dcef308a 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -540,6 +540,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, print stdout if stderr: print >>sys.stderr, stderr + sys.stdout.flush() + sys.stderr.flush() if result[0] == INTERRUPTED: assert result[1] == 'KeyboardInterrupt' raise KeyboardInterrupt # What else?