summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-06-27 15:41:33 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-06-27 15:41:33 (GMT)
commit67a7b06008da37267e4d6f86566c39af208f0b27 (patch)
tree853da67815f4bd18346510b0fd406fea2f62cb3c /Lib/test/regrtest.py
parent932f5be6c5535762470ca2559ffaab386f059853 (diff)
parent8237258e094f7d7beddcd6dd113213f2fba2b269 (diff)
downloadcpython-67a7b06008da37267e4d6f86566c39af208f0b27.zip
cpython-67a7b06008da37267e4d6f86566c39af208f0b27.tar.gz
cpython-67a7b06008da37267e4d6f86566c39af208f0b27.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/regrtest.py')
-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 90931e7..beb2ba8 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -677,6 +677,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?