From: Philip Jenvey Date: Tue, 13 Nov 2012 20:26:31 +0000 (-0800) Subject: add gc_collects to weakref tests X-Git-Tag: v3.2.4rc1~341 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3acc7ef1c5f9eb7cc4a56672ac2ee028c5522b61;p=thirdparty%2FPython%2Fcpython.git add gc_collects to weakref tests --- diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 7a2dd0c8f17f..3c14c80481eb 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)