Skip to content

Commit

Permalink
test.regrtest: flush stdout when display progress (pythonGH-7105)
Browse files Browse the repository at this point in the history
runtest_mp.py: call print() with flush=True.
(cherry picked from commit 4f0bc7f)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
  • Loading branch information
vstinner authored and miss-islington committed May 25, 2018
1 parent ef91dde commit 6ad4f0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/test/libregrtest/runtest_mp.py
Expand Up @@ -183,7 +183,7 @@ def get_running(workers):
except queue.Empty:
running = get_running(workers)
if running and not regrtest.ns.pgo:
print('running: %s' % ', '.join(running))
print('running: %s' % ', '.join(running), flush=True)
continue

test, stdout, stderr, result = item
Expand Down Expand Up @@ -235,6 +235,6 @@ def get_running(workers):
line = "Waiting for %s (%s tests)" % (', '.join(running), len(running))
if dt >= WAIT_PROGRESS:
line = "%s since %.0f sec" % (line, dt)
print(line)
print(line, flush=True)
for worker in workers:
worker.join(WAIT_PROGRESS)

0 comments on commit 6ad4f0f

Please sign in to comment.