diff options
author | 2020-10-09 11:29:21 -0700 | |
---|---|---|
committer | 2020-10-09 11:29:21 -0700 | |
commit | 8bf87ae6ceb5222af12d8f33ac94069ece092fe5 (patch) | |
tree | bf024eab8b8961888bec8b1e1302725c12ff377b /lib-python | |
parent | test_multiprocessing: pypy's GC doesn't have {get,set}_threshold (diff) | |
download | pypy-8bf87ae6ceb5222af12d8f33ac94069ece092fe5.tar.gz pypy-8bf87ae6ceb5222af12d8f33ac94069ece092fe5.tar.bz2 pypy-8bf87ae6ceb5222af12d8f33ac94069ece092fe5.zip |
test_multiprocessing: Sprinkle some explicit GC collection into tests expecting weakref cleanup
Diffstat (limited to 'lib-python')
-rw-r--r-- | lib-python/2.7/test/test_multiprocessing.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib-python/2.7/test/test_multiprocessing.py b/lib-python/2.7/test/test_multiprocessing.py index ebb0780ed8..9b21ac6797 100644 --- a/lib-python/2.7/test/test_multiprocessing.py +++ b/lib-python/2.7/test/test_multiprocessing.py @@ -374,6 +374,7 @@ class _TestProcess(BaseTestCase): del c p.start() p.join() + support.gc_collect() self.assertIs(wr(), None) self.assertEqual(q.get(), 5) @@ -1358,6 +1359,7 @@ class _TestPool(BaseTestCase): self.pool.map(identity, objs) del objs + support.gc_collect() time.sleep(DELTA) # let threaded cleanup code run self.assertEqual(set(wr() for wr in refs), {None}) # With a process pool, copies of the objects are returned, check |