From ffd72737d321bac6fbdb4ca7c70615ae4c9de387 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sun, 11 May 2014 16:36:22 +0200 Subject: [PATCH] Fix debugging output to work with -W --- Lib/test/test_cmd_line_script.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_cmd_line_script.py b/Lib/test/test_cmd_line_script.py index 5b6073e24b2..9a71fdb5ad3 100644 --- a/Lib/test/test_cmd_line_script.py +++ b/Lib/test/test_cmd_line_script.py @@ -188,8 +188,8 @@ class CmdLineTest(unittest.TestCase): while True: data = stderr.read(4) if support.verbose: - print("repl stderr[:4]:", repr(data)) - sys.stdout.flush() + print("repl stderr[:4]:", repr(data), file=sys.__stdout__) + sys.__stdout__.flush() if data == b">>> ": break stderr.readline()