summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_iter.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-06-22 20:29:32 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-06-22 20:29:32 (GMT)
commit1fa17e65a3f63507e5d2a6b1cce9e60262191c0e (patch)
tree060216283bc469654d1a9379b2be8d512812ccd5 /Lib/test/test_iter.py
parent60995fbdc51ee81d85e953f7bda7087cf93b0e17 (diff)
downloadcpython-1fa17e65a3f63507e5d2a6b1cce9e60262191c0e.zip
cpython-1fa17e65a3f63507e5d2a6b1cce9e60262191c0e.tar.gz
cpython-1fa17e65a3f63507e5d2a6b1cce9e60262191c0e.tar.bz2
Merged revisions 82165 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r82165 | benjamin.peterson | 2010-06-22 15:26:20 -0500 (Tue, 22 Jun 2010) | 1 line must force gc here ........
Diffstat (limited to 'Lib/test/test_iter.py')
-rw-r--r--Lib/test/test_iter.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_iter.py b/Lib/test/test_iter.py
index 3642c44..5878c79 100644
--- a/Lib/test/test_iter.py
+++ b/Lib/test/test_iter.py
@@ -1,7 +1,7 @@
# Test iterators.
import unittest
-from test.support import run_unittest, TESTFN, unlink
+from test.support import run_unittest, TESTFN, unlink, gc_collect
# Test result of triple loop (too big to inline)
TRIPLETS = [(0, 0, 0), (0, 0, 1), (0, 0, 2),
@@ -775,6 +775,7 @@ class TestCase(unittest.TestCase):
x = C()
self.assertEqual(C.count, 1)
del x
+ gc_collect()
self.assertEqual(C.count, 0)
l = [C(), C(), C()]
self.assertEqual(C.count, 3)
@@ -783,6 +784,7 @@ class TestCase(unittest.TestCase):
except ValueError:
pass
del l
+ gc_collect()
self.assertEqual(C.count, 0)