From: Philip Jenvey Date: Tue, 13 Nov 2012 20:26:31 +0000 (-0800) Subject: add gc_collects to weakref tests X-Git-Tag: v3.3.1rc1~638^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3acc7ef1c5f9eb7cc4a56672ac2ee028c5522b61;p=python add gc_collects to weakref tests --- diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 7a2dd0c8f1..3c14c80481 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -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)