summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-08-24 23:02:15 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-08-24 23:02:15 (GMT)
commit18bb702182e6962c1b5e4eef96b65b8996d3ec8a (patch)
tree1f8dde3a3a45a76942ed07eb6f8cb7810734c924
parent549c1972f2b063e3d36ffff6c917372db512e7d4 (diff)
downloadcpython-18bb702182e6962c1b5e4eef96b65b8996d3ec8a.zip
cpython-18bb702182e6962c1b5e4eef96b65b8996d3ec8a.tar.gz
cpython-18bb702182e6962c1b5e4eef96b65b8996d3ec8a.tar.bz2
fix some test_weakref tests to not rely on ref-counting (closes #22267)
-rw-r--r--Lib/test/test_weakref.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py
index cccb515..0a59120 100644
--- a/Lib/test/test_weakref.py
+++ b/Lib/test/test_weakref.py
@@ -1317,6 +1317,7 @@ class MappingTestCase(TestBase):
yield Object(v), v
finally:
it = None # should commit all removals
+ gc.collect()
self.check_weak_destroy_and_mutate_while_iterating(dict, testcontext)
def test_weak_values_destroy_while_iterating(self):
@@ -1339,6 +1340,7 @@ class MappingTestCase(TestBase):
yield k, Object(k)
finally:
it = None # should commit all removals
+ gc.collect()
self.check_weak_destroy_and_mutate_while_iterating(dict, testcontext)
def test_make_weak_keyed_dict_from_dict(self):