diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-06-22 20:34:34 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-06-22 20:34:34 (GMT) |
commit | 945c579829e95c31e6808400b90714168598158e (patch) | |
tree | 1805f1b12228347f591a15730ff05d0c556b30c0 /Lib/test/test_iter.py | |
parent | 1fa17e65a3f63507e5d2a6b1cce9e60262191c0e (diff) | |
download | cpython-945c579829e95c31e6808400b90714168598158e.zip cpython-945c579829e95c31e6808400b90714168598158e.tar.gz cpython-945c579829e95c31e6808400b90714168598158e.tar.bz2 |
Merged revisions 82167 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82167 | benjamin.peterson | 2010-06-22 15:32:02 -0500 (Tue, 22 Jun 2010) | 1 line
mark ref counting as impl detail
........
Diffstat (limited to 'Lib/test/test_iter.py')
-rw-r--r-- | Lib/test/test_iter.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_iter.py b/Lib/test/test_iter.py index 5878c79..e424303 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, gc_collect +from test.support import run_unittest, TESTFN, unlink, cpython_only # Test result of triple loop (too big to inline) TRIPLETS = [(0, 0, 0), (0, 0, 1), (0, 0, 2), @@ -761,8 +761,9 @@ class TestCase(unittest.TestCase): (a, b), (c,) = IteratingSequenceClass(2), {42: 24} self.assertEqual((a, b, c), (0, 1, 42)) - # Test reference count behavior + @cpython_only + def test_ref_counting_behavior(self): class C(object): count = 0 def __new__(cls): @@ -775,7 +776,6 @@ 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) @@ -784,7 +784,6 @@ class TestCase(unittest.TestCase): except ValueError: pass del l - gc_collect() self.assertEqual(C.count, 0) |