diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-06-22 20:26:20 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-06-22 20:26:20 (GMT) |
commit | 694781b1d31896653126bf39b9bc39167a6d9ea6 (patch) | |
tree | e03d8e3c5df5df2f0b3885852c634b697dfdf47e /Lib | |
parent | 5b9ce31c395a74e2d0fb13c03b87f0eaf1cc3611 (diff) | |
download | cpython-694781b1d31896653126bf39b9bc39167a6d9ea6.zip cpython-694781b1d31896653126bf39b9bc39167a6d9ea6.tar.gz cpython-694781b1d31896653126bf39b9bc39167a6d9ea6.tar.bz2 |
must force gc here
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_iter.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_iter.py b/Lib/test/test_iter.py index ef19d1d..a56b89e 100644 --- a/Lib/test/test_iter.py +++ b/Lib/test/test_iter.py @@ -2,7 +2,7 @@ import unittest from test.test_support import run_unittest, TESTFN, unlink, have_unicode, \ - check_py3k_warnings + check_py3k_warnings, gc_collect # Test result of triple loop (too big to inline) TRIPLETS = [(0, 0, 0), (0, 0, 1), (0, 0, 2), @@ -807,6 +807,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) @@ -815,6 +816,7 @@ class TestCase(unittest.TestCase): except ValueError: pass del l + gc_collect() self.assertEqual(C.count, 0) |