summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-09-13 04:55:54 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-09-13 04:55:54 (GMT)
commitac2d1c71534f3de62980b0e953eaf6f31d8fd517 (patch)
tree4e7bbf4cac9982ef8d8facce5beed3d35cd3ff90
parent720acbf31b960bd6fb5f6bf2ad6a3e319428749c (diff)
downloadcpython-ac2d1c71534f3de62980b0e953eaf6f31d8fd517.zip
cpython-ac2d1c71534f3de62980b0e953eaf6f31d8fd517.tar.gz
cpython-ac2d1c71534f3de62980b0e953eaf6f31d8fd517.tar.bz2
Issue #27952: Capture stderr in run_script()
-rw-r--r--Lib/test/test_tools/test_fixcid.py3
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
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: