summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-05-28 11:30:42 (GMT)
committerGitHub <noreply@github.com>2018-05-28 11:30:42 (GMT)
commit1da37adc281286b8ef9ff3e882fe9de35c23507f (patch)
tree760d24853b0fb97787a4d0fd9ab6bb2fefdfebd1
parent804fcf66559992db9d23695e501c502ab20b7712 (diff)
downloadcpython-1da37adc281286b8ef9ff3e882fe9de35c23507f.zip
cpython-1da37adc281286b8ef9ff3e882fe9de35c23507f.tar.gz
cpython-1da37adc281286b8ef9ff3e882fe9de35c23507f.tar.bz2
test.regrtest: flush stdout to display progress (#7120)
Call sys.stdout.flush() after displaying "running: ...".
-rwxr-xr-xLib/test/regrtest.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 6df8f86..c4f2781 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -782,6 +782,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
running = get_running(workers)
if running and not pgo:
print('running: %s' % ', '.join(running))
+ sys.stdout.flush()
continue
test, stdout, stderr, result = item
@@ -802,7 +803,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
display_progress(test_index, text)
if stdout:
- print stdout
+ print(stdout)
sys.stdout.flush()
if stderr and not pgo:
print >>sys.stderr, stderr