From 9eb60c4372ea8a95a8f30104ba8246d05bace446 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 25 May 2018 00:46:52 +0200 Subject: [PATCH] test.regrtest: flush stdout when display progress runtest_mp.py: call print() with flush=True. --- Lib/test/libregrtest/runtest_mp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/libregrtest/runtest_mp.py b/Lib/test/libregrtest/runtest_mp.py index 31b830d75f4f17..598754f279d856 100644 --- a/Lib/test/libregrtest/runtest_mp.py +++ b/Lib/test/libregrtest/runtest_mp.py @@ -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 @@ -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)