diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 90931e7fd2d..beb2ba85cfd 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -677,6 +677,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, print(stdout) if stderr: print(stderr, file=sys.stderr) + sys.stdout.flush() + sys.stderr.flush() if result[0] == INTERRUPTED: assert result[1] == 'KeyboardInterrupt' raise KeyboardInterrupt # What else?