mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Flush stdout and stderr when running tests in parallel
(helps getting results in real-time when stdio is transmitted over a pipe or socket)
This commit is contained in:
parent
3a121561b7
commit
cf807c04a3
1 changed files with 2 additions and 0 deletions
|
@ -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?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue