diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-06-27 15:41:07 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-06-27 15:41:07 (GMT) |
commit | 8237258e094f7d7beddcd6dd113213f2fba2b269 (patch) | |
tree | e1337f79d30337fe015a10f6dd1016bbea338d18 /Lib/test/regrtest.py | |
parent | d0bb9c638634335a5a95ec985357b2dcd4ec36fc (diff) | |
download | cpython-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/regrtest.py')
-rwxr-xr-x | Lib/test/regrtest.py | 2 |
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? |