From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 25 May 2018 16:46:33 +0000 (-0700) Subject: test.regrtest: flush stdout when display progress (GH-7105) X-Git-Tag: v3.7.0b5~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=af1d007bdb3d74cf107d1ad569f4d344f8c57fb8;p=python 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 --- diff --git a/Lib/test/libregrtest/runtest_mp.py b/Lib/test/libregrtest/runtest_mp.py index 31b830d75f..598754f279 100644 --- a/Lib/test/libregrtest/runtest_mp.py +++ b/Lib/test/libregrtest/runtest_mp.py @@ -183,7 +183,7 @@ def run_tests_multiprocess(regrtest): 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 run_tests_multiprocess(regrtest): 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)