commit | b21d8109af7b6b3577e566e8c485ec5bcde20181 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Mon Feb 16 20:39:12 2009 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Mon Feb 16 20:39:12 2009 +0000 |
tree | 03231364353c78206be77c05d95e366bf5df9580 | |
parent | afb5a48be22c118bcba108d481cfbc91e27295ee [diff] [blame] |
Add GC support to count() objects. Backport candidate.
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py index ce5c898..a33939e 100644 --- a/Lib/test/test_itertools.py +++ b/Lib/test/test_itertools.py
@@ -966,6 +966,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)