]> granicus.if.org Git - python/commitdiff
Issue #27952: Capture stderr in run_script()
authorBerker Peksag <berker.peksag@gmail.com>
Tue, 13 Sep 2016 04:55:54 +0000 (07:55 +0300)
committerBerker Peksag <berker.peksag@gmail.com>
Tue, 13 Sep 2016 04:55:54 +0000 (07:55 +0300)
Lib/test/test_tools/test_fixcid.py

index 7f25c1739829b677b6067b36abf579509b5d80d6..bce029b1aac83ae6ca3aeb03b908567de174e651 100644 (file)
@@ -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: