Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 74adbaa

Browse files
committed
Merge: Fix ResourceWarnings in test_subprocess.
2 parents 2736c5d + 0d7cda3 commit 74adbaa

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/test/test_subprocess.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,6 +1501,8 @@ def test_zombie_fast_process_del(self):
15011501
'time.sleep(0.2)'],
15021502
stdout=subprocess.PIPE,
15031503
stderr=subprocess.PIPE)
1504+
self.addCleanup(p.stdout.close)
1505+
self.addCleanup(p.stderr.close)
15041506
ident = id(p)
15051507
pid = p.pid
15061508
del p
@@ -1518,6 +1520,8 @@ def test_leak_fast_process_del_killed(self):
15181520
'time.sleep(3)'],
15191521
stdout=subprocess.PIPE,
15201522
stderr=subprocess.PIPE)
1523+
self.addCleanup(p.stdout.close)
1524+
self.addCleanup(p.stderr.close)
15211525
ident = id(p)
15221526
pid = p.pid
15231527
del p

0 commit comments

Comments
 (0)