8000 bpo-43826: Fix resource warning due to unclosed objects. (GH-25381) · python/cpython@7179930 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7179930

Browse files
authored
bpo-43826: Fix resource warning due to unclosed objects. (GH-25381)
1 parent bb21e28 commit 7179930

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Lib/test/test_subprocess.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,8 @@ def test_pipesizes(self):
719719
# However, this function is not yet in _winapi.
720720
p.stdin.write(b"pear")
721721
p.stdin.close()
722+
p.stdout.close()
723+
p.stderr.close()
722724
finally:
723725
p.kill()
724726
p.wait()
@@ -746,6 +748,8 @@ def test_pipesize_default(self):
746748
# On other platforms we cannot test the pipe size (yet). But above
747749
# code using pipesize=-1 should not crash.
748750
p.stdin.close()
751+
p.stdout.close()
752+
p.stderr.close()
749753
finally:
750754
p.kill()
751755
p.wait()
@@ -3243,6 +3247,7 @@ def test_send_signal_race2(self):
32433247
with mock.patch.object(p, 'poll', new=lambda: None):
32443248
p.returncode = None
32453249
p.send_signal(signal.SIGTERM)
3250+
p.kill()
32463251

32473252
def test_communicate_repeated_call_after_stdout_close(self):
32483253
proc = subprocess.Popen([sys.executable, '-c',

0 commit comments

Comments
 (0)
0