[Python-checkins] r86209 - python/branches/py3k/Lib/test/test_threading.py
brian.curtin
python-checkins at python.org
Fri Nov 5 18:22:46 CET 2010
Author: brian.curtin
Date: Fri Nov 5 18:22:46 2010
New Revision: 86209
Log:
Close subprocess pipes to clean up ResourceWarnings
Modified:
python/branches/py3k/Lib/test/test_threading.py
Modified: python/branches/py3k/Lib/test/test_threading.py
==============================================================================
--- python/branches/py3k/Lib/test/test_threading.py (original)
+++ python/branches/py3k/Lib/test/test_threading.py Fri Nov 5 18:22:46 2010
@@ -327,6 +327,8 @@
"""],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
+ self.addCleanup(p.stdout.close)
+ self.addCleanup(p.stderr.close)
stdout, stderr = p.communicate()
rc = p.returncode
self.assertFalse(rc == 2, "interpreted was blocked")
@@ -352,6 +354,8 @@
"""],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
+ self.addCleanup(p.stdout.close)
+ self.addCleanup(p.stderr.close)
stdout, stderr = p.communicate()
self.assertEqual(stdout.strip(),
b"Woke up, sleep function is: <built-in function sleep>")
More information about the Python-checkins
mailing list