summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Curtin <brian.curtin@gmail.com>2010-11-05 15:17:11 (GMT)
committerBrian Curtin <brian.curtin@gmail.com>2010-11-05 15:17:11 (GMT)
commit43ec577e2c2d630fc38a1e7ebcc13d519f79085c (patch)
treea974cfa1b59a6b18191a975a0b8993039461e099
parentcbad4df179456a7e4116d29358445e352c3a3d56 (diff)
downloadcpython-43ec577e2c2d630fc38a1e7ebcc13d519f79085c.zip
cpython-43ec577e2c2d630fc38a1e7ebcc13d519f79085c.tar.gz
cpython-43ec577e2c2d630fc38a1e7ebcc13d519f79085c.tar.bz2
Close subprocess pipes in _kill. Fixes a number of ResourceWarnings.
-rw-r--r--Lib/test/test_os.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index b67eed5..c7cf24b 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -1006,6 +1006,9 @@ class Win32KillTests(unittest.TestCase):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
stdin=subprocess.PIPE)
+ self.addCleanup(proc.stdout.close)
+ self.addCleanup(proc.stderr.close)
+ self.addCleanup(proc.stdin.close)
count, max = 0, 100
while count < max and proc.poll() is None: