Commit cf807c04 authored by Antoine Pitrou's avatar Antoine Pitrou

Flush stdout and stderr when running tests in parallel

(helps getting results in real-time when stdio is transmitted over a pipe or socket)
parent 3a121561
...@@ -540,6 +540,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, ...@@ -540,6 +540,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
print stdout print stdout
if stderr: if stderr:
print >>sys.stderr, stderr print >>sys.stderr, stderr
sys.stdout.flush()
sys.stderr.flush()
if result[0] == INTERRUPTED: if result[0] == INTERRUPTED:
assert result[1] == 'KeyboardInterrupt' assert result[1] == 'KeyboardInterrupt'
raise KeyboardInterrupt # What else? raise KeyboardInterrupt # What else?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment