From 0d7cda3e6327251215560bc2e21404abe392289c Mon Sep 17 00:00:00 2001 From: Nadeem Vawda Date: Fri, 19 Aug 2011 05:12:01 +0200 Subject: [PATCH] Fix ResourceWarnings in test_subprocess. --- Lib/test/test_subprocess.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index b3a5fb0138..ff76ec445c 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -1404,6 +1404,8 @@ class POSIXProcessTestCase(BaseTestCase): 'time.sleep(0.2)'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + self.addCleanup(p.stdout.close) + self.addCleanup(p.stderr.close) ident = id(p) pid = p.pid del p @@ -1421,6 +1423,8 @@ class POSIXProcessTestCase(BaseTestCase): 'time.sleep(3)'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + self.addCleanup(p.stdout.close) + self.addCleanup(p.stderr.close) ident = id(p) pid = p.pid del p -- 2.40.0