[Python-checkins] cpython (3.5): Issue #27952: Capture stderr in run_script()

berker.peksag python-checkins at python.org
Tue Sep 13 00:56:04 EDT 2016


https://hg.python.org/cpython/rev/5ae3782c4e05
changeset:   103733:5ae3782c4e05
branch:      3.5
parent:      103730:aa88456f1749
user:        Berker Peksag <berker.peksag at gmail.com>
date:        Tue Sep 13 07:55:54 2016 +0300
summary:
  Issue #27952: Capture stderr in run_script()

files:
  Lib/test/test_tools/test_fixcid.py |  3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_tools/test_fixcid.py b/Lib/test/test_tools/test_fixcid.py
--- a/Lib/test/test_tools/test_fixcid.py
+++ b/Lib/test/test_tools/test_fixcid.py
@@ -83,7 +83,8 @@
         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:

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list