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