8000 Close stdin and stdout after the proc finishes. · python/cpython@8cd338d · GitHub
[go: up one dir, main page]

Skip to content

Commit 8cd338d

Browse files
Close stdin and stdout after the proc finishes.
1 parent 133b707 commit 8cd338d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test__interpreters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def test_still_running_at_exit(self):
5454
time.sleep(1_000_000)
5555
""")
5656
filename = script_helper.make_script(self.dirname, 'interp', script)
57-
proc = script_helper.spawn_python(filename)
58-
retcode = proc.wait()
57+
with script_helper.spawn_python(filename) as proc:
58+
retcode = proc.wait()
5959

6060
self.assertEqual(retcode, 0)
6161

0 commit comments

Comments
 (0)
0