[pypy-commit] pypy stdlib-2.7.3: Add a couple of gc.collect() to ensure Popen.__del__ is called.
amauryfa
noreply at buildbot.pypy.org
Thu Jun 14 23:15:06 CEST 2012
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: stdlib-2.7.3
Changeset: r55669:972bb86412ca
Date: 2012-06-14 23:13 +0200
http://bitbucket.org/pypy/pypy/changeset/972bb86412ca/
Log: Add a couple of gc.collect() to ensure Popen.__del__ is called.
diff --git a/lib-python/2.7/test/test_subprocess.py b/lib-python/2.7/test/test_subprocess.py
--- a/lib-python/2.7/test/test_subprocess.py
+++ b/lib-python/2.7/test/test_subprocess.py
@@ -967,6 +967,7 @@
ident = id(p)
pid = p.pid
del p
+ test_support.gc_collect()
# check that p is in the active processes list
self.assertIn(ident, [id(o) for o in subprocess._active])
@@ -986,6 +987,7 @@
ident = id(p)
pid = p.pid
del p
+ test_support.gc_collect()
os.kill(pid, signal.SIGKILL)
# check that p is in the active processes list
self.assertIn(ident, [id(o) for o in subprocess._active])
More information about the pypy-commit
mailing list