mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Issue #25220: Use print(flush=True) in libregrtest
This commit is contained in:
parent
76f756d934
commit
f33536c430
4 changed files with 15 additions and 25 deletions
|
@ -70,9 +70,8 @@ def run_tests_slave(slaveargs):
|
|||
except BaseException as e:
|
||||
traceback.print_exc()
|
||||
result = CHILD_ERROR, str(e)
|
||||
sys.stdout.flush()
|
||||
print() # Force a newline (just in case)
|
||||
print(json.dumps(result))
|
||||
print(json.dumps(result), flush=True)
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
|
@ -184,11 +183,9 @@ def run_tests_multiprocess(regrtest):
|
|||
|
||||
# Copy stdout and stderr from the child process
|
||||
if stdout:
|
||||
print(stdout)
|
||||
print(stdout, flush=True)
|
||||
if stderr:
|
||||
print(stderr, file=sys.stderr)
|
||||
sys.stdout.flush()
|
||||
sys.stderr.flush()
|
||||
print(stderr, file=sys.stderr, flush=True)
|
||||
|
||||
if result[0] == INTERRUPTED:
|
||||
raise KeyboardInterrupt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue