[Python-checkins] test.regrtest: flush stdout when display progress (GH-7105)
Miss Islington (bot)
webhook-mailer at python.org
Fri May 25 13:08:31 EDT 2018
https://github.com/python/cpython/commit/ecd0bb2693bfead04df543827cefc305bddd1ea7
commit: ecd0bb2693bfead04df543827cefc305bddd1ea7
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-05-25T10:08:23-07:00
summary:
test.regrtest: flush stdout when display progress (GH-7105)
runtest_mp.py: call print() with flush=True.
(cherry picked from commit 4f0bc7f7ab6ec23594b0efe11d082f78ae42abed)
Co-authored-by: Victor Stinner <vstinner at redhat.com>
files:
M Lib/test/libregrtest/runtest_mp.py
diff --git a/Lib/test/libregrtest/runtest_mp.py b/Lib/test/libregrtest/runtest_mp.py
index 779ff01a649c..899c57979f85 100644
--- a/Lib/test/libregrtest/runtest_mp.py
+++ b/Lib/test/libregrtest/runtest_mp.py
@@ -187,7 +187,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
@@ -239,6 +239,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)
More information about the Python-checkins
mailing list