[Python-checkins] r86107 - python/branches/py3k/Lib/test/test_threading.py

brian.curtin python-checkins at python.org
Tue Nov 2 04:59:09 CET 2010


Author: brian.curtin
Date: Tue Nov  2 04:59:09 2010
New Revision: 86107

Log:
Clean up ResourceWarnings. Explictly close stdout from the subprocess.


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	Tue Nov  2 04:59:09 2010
@@ -445,6 +445,7 @@
         p = subprocess.Popen([sys.executable, "-c", script], stdout=subprocess.PIPE)
         rc = p.wait()
         data = p.stdout.read().decode().replace('\r', '')
+        p.stdout.close()
         self.assertEqual(data, "end of main\nend of thread\n")
         self.assertFalse(rc == 2, "interpreter was blocked")
         self.assertTrue(rc == 0, "Unexpected error")


More information about the Python-checkins mailing list