From: Antoine Pitrou Date: Wed, 27 Jun 2012 15:41:07 +0000 (+0200) Subject: Flush stdout and stderr when running tests in parallel X-Git-Tag: v3.3.0b2~383^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8237258e094f7d7beddcd6dd113213f2fba2b269;p=thirdparty%2FPython%2Fcpython.git Flush stdout and stderr when running tests in parallel (helps getting results in real-time when stdio is transmitted over a pipe or socket) --- diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 714a116f87d5..46c3ac79dfaf 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -610,6 +610,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, print(stdout) if stderr: print(stderr, file=sys.stderr) + sys.stdout.flush() + sys.stderr.flush() if result[0] == INTERRUPTED: assert result[1] == 'KeyboardInterrupt' raise KeyboardInterrupt # What else?