Kaydet (Commit) 1fa17e65 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

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
........
üst 60995fbd
# Test iterators. # Test iterators.
import unittest 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) # Test result of triple loop (too big to inline)
TRIPLETS = [(0, 0, 0), (0, 0, 1), (0, 0, 2), TRIPLETS = [(0, 0, 0), (0, 0, 1), (0, 0, 2),
...@@ -775,6 +775,7 @@ class TestCase(unittest.TestCase): ...@@ -775,6 +775,7 @@ class TestCase(unittest.TestCase):
x = C() x = C()
self.assertEqual(C.count, 1) self.assertEqual(C.count, 1)
del x del x
gc_collect()
self.assertEqual(C.count, 0) self.assertEqual(C.count, 0)
l = [C(), C(), C()] l = [C(), C(), C()]
self.assertEqual(C.count, 3) self.assertEqual(C.count, 3)
...@@ -783,6 +784,7 @@ class TestCase(unittest.TestCase): ...@@ -783,6 +784,7 @@ class TestCase(unittest.TestCase):
except ValueError: except ValueError:
pass pass
del l del l
gc_collect()
self.assertEqual(C.count, 0) self.assertEqual(C.count, 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment