[Python-checkins] r86198 - python/branches/py3k/Lib/test/test_os.py

brian.curtin python-checkins at python.org
Fri Nov 5 16:17:12 CET 2010


Author: brian.curtin
Date: Fri Nov  5 16:17:11 2010
New Revision: 86198

Log:
Close subprocess pipes in _kill. Fixes a number of ResourceWarnings.


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

Modified: python/branches/py3k/Lib/test/test_os.py
==============================================================================
--- python/branches/py3k/Lib/test/test_os.py	(original)
+++ python/branches/py3k/Lib/test/test_os.py	Fri Nov  5 16:17:11 2010
@@ -1006,6 +1006,9 @@
                                 stdout=subprocess.PIPE,
                                 stderr=subprocess.PIPE,
                                 stdin=subprocess.PIPE)
+        self.addCleanup(proc.stdout.close)
+        self.addCleanup(proc.stderr.close)
+        self.addCleanup(proc.stdin.close)
 
         count, max = 0, 100
         while count < max and proc.poll() is None:


More information about the Python-checkins mailing list