diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-04 15:57:20 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-04 15:57:20 (GMT) |
commit | a36e245deb9068c09092a62104c8832302f7b684 (patch) | |
tree | 39b069ec67962c92e6514be2cde9c180c4c12a28 /Lib/test | |
parent | 7c924ec9258fd8e324dedcdcc35bb8706aea7922 (diff) | |
download | cpython-a36e245deb9068c09092a62104c8832302f7b684.zip cpython-a36e245deb9068c09092a62104c8832302f7b684.tar.gz cpython-a36e245deb9068c09092a62104c8832302f7b684.tar.bz2 |
Fix transient refleak in test_popen2.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_popen2.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/test_popen2.py b/Lib/test/test_popen2.py index 1383c62..715858e 100644 --- a/Lib/test/test_popen2.py +++ b/Lib/test/test_popen2.py @@ -50,7 +50,13 @@ class Popen2Test(unittest.TestCase): 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): |