commit | d6280f4b78d29dd5dadc7c82702fa7cc17140795 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Mon Feb 16 20:50:56 2009 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Mon Feb 16 20:50:56 2009 +0000 |
tree | 4cbc5268f1e5575b817f5a42ee7819b7bc20ea0e | |
parent | d67c60ff8116e6c9ac73ad8cd556573a73598b4f [diff] |
Add GC support to count() objects.
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py index 812a1ef..c34b915 100644 --- a/Lib/test/test_itertools.py +++ b/Lib/test/test_itertools.py
@@ -979,6 +979,11 @@ 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)