Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8237258

Browse files
committed
Flush stdout and stderr when running tests in parallel
(helps getting results in real-time when stdio is transmitted over a pipe or socket)
1 parent d0bb9c6 commit 8237258

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Lib/test/regrtest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,8 @@ def work():
610610
print(stdout)
611611
if stderr:
612612
print(stderr, file=sys.stderr)
613+
sys.stdout.flush()
614+
sys.stderr.flush()
613615
if result[0] == INTERRUPTED:
614616
assert result[1] == 'KeyboardInterrupt'
615617
raise KeyboardInterrupt # What else?

0 commit comments

Comments
 (0)