Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit ac2d1c7

Browse files
committed
Issue python#27952: Capture stderr in run_script()
1 parent 720acbf commit ac2d1c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_tools/test_fixcid.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ def run_script(self, input="", *, args=("-",), substfile="xx yy\n"):
8383
script = os.path.join(scriptsdir, "fixcid.py")
8484
with support.swap_attr(sys, "argv", argv), \
8585
support.swap_attr(sys, "stdin", StringIO(input)), \
86-
support.captured_stdout() as output:
86+
support.captured_stdout() as output, \
87+
support.captured_stderr():
8788
try:
8889
runpy.run_path(script, run_name="__main__")
8990
except SystemExit as exit:

0 commit comments

Comments
 (0)