[Python-checkins] r86212 - in python/branches/release27-maint: Lib/test/test_threading.py

brian.curtin python-checkins at python.org
Fri Nov 5 18:24:20 CET 2010


Author: brian.curtin
Date: Fri Nov  5 18:24:20 2010
New Revision: 86212

Log:
Merged revisions 86209 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86209 | brian.curtin | 2010-11-05 12:22:46 -0500 (Fri, 05 Nov 2010) | 2 lines
  
  Close subprocess pipes to clean up ResourceWarnings
........


Modified:
   python/branches/release27-maint/   (props changed)
   python/branches/release27-maint/Lib/test/test_threading.py

Modified: python/branches/release27-maint/Lib/test/test_threading.py
==============================================================================
--- python/branches/release27-maint/Lib/test/test_threading.py	(original)
+++ python/branches/release27-maint/Lib/test/test_threading.py	Fri Nov  5 18:24:20 2010
@@ -330,6 +330,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")
@@ -355,6 +357,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(),
             "Woke up, sleep function is: <built-in function sleep>")


More information about the Python-checkins mailing list