summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/test/test_assertions.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/unittest/test/test_assertions.py')
-rw-r--r--Lib/unittest/test/test_assertions.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/unittest/test/test_assertions.py b/Lib/unittest/test/test_assertions.py
index f5e64d6..a0db3423 100644
--- a/Lib/unittest/test/test_assertions.py
+++ b/Lib/unittest/test/test_assertions.py
@@ -2,6 +2,7 @@ import datetime
import warnings
import weakref
import unittest
+from test.support import gc_collect
from itertools import product
@@ -124,8 +125,10 @@ class Test_Assertions(unittest.TestCase):
self.foo()
Foo("test_functional").run()
+ gc_collect() # For PyPy or other GCs.
self.assertIsNone(wr())
Foo("test_with").run()
+ gc_collect() # For PyPy or other GCs.
self.assertIsNone(wr())
def testAssertNotRegex(self):