summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-06-27 15:41:07 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-06-27 15:41:07 (GMT)
commit8237258e094f7d7beddcd6dd113213f2fba2b269 (patch)
treee1337f79d30337fe015a10f6dd1016bbea338d18 /Lib/test
parentd0bb9c638634335a5a95ec985357b2dcd4ec36fc (diff)
downloadcpython-8237258e094f7d7beddcd6dd113213f2fba2b269.zip
cpython-8237258e094f7d7beddcd6dd113213f2fba2b269.tar.gz
cpython-8237258e094f7d7beddcd6dd113213f2fba2b269.tar.bz2
Flush stdout and stderr when running tests in parallel
(helps getting results in real-time when stdio is transmitted over a pipe or socket)
Diffstat (limited to 'Lib/test')
-rwxr-xr-xLib/test/regrtest.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 714a116..46c3ac7 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?