summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorNadeem Vawda <nadeem.vawda@gmail.com>2011-08-19 03:12:01 (GMT)
committerNadeem Vawda <nadeem.vawda@gmail.com>2011-08-19 03:12:01 (GMT)
commit0d7cda3e6327251215560bc2e21404abe392289c (patch)
treed3010193830babd0bfaab914fb7838b6e0650038 /Lib/test
parent72d161af51a3c838da79d30002f0f6fb65d792bd (diff)
downloadcpython-0d7cda3e6327251215560bc2e21404abe392289c.zip
cpython-0d7cda3e6327251215560bc2e21404abe392289c.tar.gz
cpython-0d7cda3e6327251215560bc2e21404abe392289c.tar.bz2
Fix ResourceWarnings in test_subprocess.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_subprocess.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index b3a5fb0..ff76ec4 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