From ac2d1c71534f3de62980b0e953eaf6f31d8fd517 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Tue, 13 Sep 2016 07:55:54 +0300 Subject: Issue #27952: Capture stderr in run_script() --- Lib/test/test_tools/test_fixcid.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_tools/test_fixcid.py b/Lib/test/test_tools/test_fixcid.py index 7f25c17..bce029b 100644 --- a/Lib/test/test_tools/test_fixcid.py +++ b/Lib/test/test_tools/test_fixcid.py @@ -83,7 +83,8 @@ class Test(unittest.TestCase): script = os.path.join(scriptsdir, "fixcid.py") with support.swap_attr(sys, "argv", argv), \ support.swap_attr(sys, "stdin", StringIO(input)), \ - support.captured_stdout() as output: + support.captured_stdout() as output, \ + support.captured_stderr(): try: runpy.run_path(script, run_name="__main__") except SystemExit as exit: -- cgit v0.12