From d6280f4b78d29dd5dadc7c82702fa7cc17140795 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Mon, 16 Feb 2009 20:50:56 +0000 Subject: Add GC support to count() objects. --- Lib/test/test_itertools.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Lib/test/test_itertools.py') diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py index 812a1efdb48..c34b915cebf 100644 --- a/Lib/test/test_itertools.py +++ b/Lib/test/test_itertools.py @@ -979,6 +979,11 @@ class TestGC(unittest.TestCase): a = [] self.makecycle(compress('ABCDEF', [1,0,1,0,1,0]), a) + def test_count(self): + a = [] + Int = type('Int', (int,), dict(x=a)) + self.makecycle(count(Int(0), Int(1)), a) + def test_cycle(self): a = [] self.makecycle(cycle([a]*2), a) -- cgit v1.2.3