[Python-checkins] r86094 - python/branches/py3k/Lib/test/test_gc.py

brian.curtin python-checkins at python.org
Mon Nov 1 17:40:17 CET 2010


Author: brian.curtin
Date: Mon Nov  1 17:40:17 2010
New Revision: 86094

Log:
Fix ResourceWarning occuring on Windows. Close stdout/stderr pipes.


Modified:
   python/branches/py3k/Lib/test/test_gc.py

Modified: python/branches/py3k/Lib/test/test_gc.py
==============================================================================
--- python/branches/py3k/Lib/test/test_gc.py	(original)
+++ python/branches/py3k/Lib/test/test_gc.py	Mon Nov  1 17:40:17 2010
@@ -489,6 +489,8 @@
                 stdout=subprocess.PIPE,
                 stderr=subprocess.PIPE)
             stdout, stderr = p.communicate()
+            p.stdout.close()
+            p.stderr.close()
             self.assertEqual(p.returncode, 0)
             self.assertEqual(stdout.strip(), b"")
             return strip_python_stderr(stderr)


More information about the Python-checkins mailing list