]> granicus.if.org Git - python/commitdiff
test.regrtest: flush stdout when display progress (#7105)
authorVictor Stinner <vstinner@redhat.com>
Fri, 25 May 2018 15:21:55 +0000 (17:21 +0200)
committerGitHub <noreply@github.com>
Fri, 25 May 2018 15:21:55 +0000 (17:21 +0200)
runtest_mp.py: call print() with flush=True.

Lib/test/libregrtest/runtest_mp.py

index 31b830d75f4f173e1364f5c1349eb4eb2969c57c..598754f279d8567120e1233f92b229ae748240b6 100644 (file)
@@ -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)