Commit c063cc20 authored by Philip Jenvey's avatar Philip Jenvey

add gc_collects to weakref tests

parent 395a54a3
......@@ -493,6 +493,7 @@ class ExceptionTests(unittest.TestCase):
e.__context__ = None
obj = None
obj = wr()
gc_collect()
self.assertTrue(obj is None, "%s" % obj)
# Some complicated construct
......@@ -509,6 +510,7 @@ class ExceptionTests(unittest.TestCase):
except MyException:
pass
obj = None
gc_collect()
obj = wr()
self.assertTrue(obj is None, "%s" % obj)
......@@ -523,6 +525,7 @@ class ExceptionTests(unittest.TestCase):
with Context():
inner_raising_func()
obj = None
gc_collect()
obj = wr()
self.assertTrue(obj is None, "%s" % obj)
......
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