projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a12156
)
Flush stdout and stderr when running tests in parallel
author
Antoine Pitrou
<solipsis@pitrou.net>
Wed, 27 Jun 2012 15:41:07 +0000
(17:41 +0200)
committer
Antoine Pitrou
<solipsis@pitrou.net>
Wed, 27 Jun 2012 15:41:07 +0000
(17:41 +0200)
(helps getting results in real-time when stdio is transmitted over a pipe or socket)
Lib/test/regrtest.py
patch
|
blob
|
history
diff --git
a/Lib/test/regrtest.py
b/Lib/test/regrtest.py
index 75a9bec02eaf803192e71a6868a61869d8fafce7..f01dcef308a7cfe5cb93d8221ff91c6c05eb8c3f 100755
(executable)
--- a/
Lib/test/regrtest.py
+++ b/
Lib/test/regrtest.py
@@
-540,6
+540,8
@@
def main(tests=None, testdir=None, verbose=0, quiet=False,
print stdout
if stderr:
print >>sys.stderr, stderr
+ sys.stdout.flush()
+ sys.stderr.flush()
if result[0] == INTERRUPTED:
assert result[1] == 'KeyboardInterrupt'
raise KeyboardInterrupt # What else?