summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_copy.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_copy.py')
-rw-r--r--Lib/test/test_copy.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_copy.py b/Lib/test/test_copy.py
index ba3d233..f1ca8cb 100644
--- a/Lib/test/test_copy.py
+++ b/Lib/test/test_copy.py
@@ -7,6 +7,7 @@ import abc
from operator import le, lt, ge, gt, eq, ne
import unittest
+from test import support
order_comparisons = le, lt, ge, gt
equality_comparisons = eq, ne
@@ -805,6 +806,7 @@ class TestCopy(unittest.TestCase):
self.assertEqual(v[c], d)
self.assertEqual(len(v), 2)
del c, d
+ support.gc_collect() # For PyPy or other GCs.
self.assertEqual(len(v), 1)
x, y = C(), C()
# The underlying containers are decoupled
@@ -834,6 +836,7 @@ class TestCopy(unittest.TestCase):
self.assertEqual(v[a].i, b.i)
self.assertEqual(v[c].i, d.i)
del c
+ support.gc_collect() # For PyPy or other GCs.
self.assertEqual(len(v), 1)
def test_deepcopy_weakvaluedict(self):
@@ -857,6 +860,7 @@ class TestCopy(unittest.TestCase):
self.assertIs(t, d)
del x, y, z, t
del d
+ support.gc_collect() # For PyPy or other GCs.
self.assertEqual(len(v), 1)
def test_deepcopy_bound_method(self):