[Python-checkins] cpython (merge 3.2 -> default): Merge: Fix ResourceWarnings in test_subprocess.
nadeem.vawda
python-checkins at python.org
Fri Aug 19 05:22:41 CEST 2011
http://hg.python.org/cpython/rev/7bf980c490e0
changeset: 71914:7bf980c490e0
parent: 71911:a32ae2749cd1
parent: 71913:f6b0c794495a
user: Nadeem Vawda <nadeem.vawda at gmail.com>
date: Fri Aug 19 05:14:40 2011 +0200
summary:
Merge: Fix ResourceWarnings in test_subprocess.
files:
Lib/test/test_subprocess.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -1501,6 +1501,8 @@
'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
@@ -1518,6 +1520,8 @@
'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
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list