diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-06-22 20:32:02 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-06-22 20:32:02 (GMT) |
commit | 7f8ede4db9c79724543d4e51270426b86e18fda9 (patch) | |
tree | 0d3b2d1e90a1d9a254c7008ff001a7dc806dfe81 | |
parent | 694781b1d31896653126bf39b9bc39167a6d9ea6 (diff) | |
download | cpython-7f8ede4db9c79724543d4e51270426b86e18fda9.zip cpython-7f8ede4db9c79724543d4e51270426b86e18fda9.tar.gz cpython-7f8ede4db9c79724543d4e51270426b86e18fda9.tar.bz2 |
mark ref counting as impl detail
-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 a56b89e..64984cc 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, gc_collect + check_py3k_warnings, cpython_only # Test result of triple loop (too big to inline) TRIPLETS = [(0, 0, 0), (0, 0, 1), (0, 0, 2), @@ -793,8 +793,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): @@ -807,7 +808,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) @@ -816,7 +816,6 @@ class TestCase(unittest.TestCase): except ValueError: pass del l - gc_collect() self.assertEqual(C.count, 0) |