[Python-checkins] r78652 - python/trunk/Lib/test/test_popen2.py
florent.xicluna
python-checkins at python.org
Thu Mar 4 16:57:21 CET 2010
Author: florent.xicluna
Date: Thu Mar 4 16:57:20 2010
New Revision: 78652
Log:
Fix transient refleak in test_popen2.
Modified:
python/trunk/Lib/test/test_popen2.py
Modified: python/trunk/Lib/test/test_popen2.py
==============================================================================
--- python/trunk/Lib/test/test_popen2.py (original)
+++ python/trunk/Lib/test/test_popen2.py Thu Mar 4 16:57:20 2010
@@ -50,7 +50,13 @@
for inst in popen2._active:
inst.wait()
popen2._cleanup()
- self.assertFalse(popen2._active, "_active not empty")
+ self.assertFalse(popen2._active, "popen2._active not empty")
+ # The os.popen*() API delegates to the subprocess module (on Unix)
+ import subprocess
+ for inst in subprocess._active:
+ inst.wait()
+ subprocess._cleanup()
+ self.assertFalse(subprocess._active, "subprocess._active not empty")
reap_children()
def validate_output(self, teststr, expected_out, r, w, e=None):
More information about the Python-checkins
mailing list