Commit 8a4448c8 authored by Benjamin Peterson's avatar Benjamin Peterson

fix some test_weakref tests to not rely on ref-counting (closes #22267)

parent e3737540
......@@ -1154,6 +1154,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):
......@@ -1175,6 +1176,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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment