diff options
author | Raymond Hettinger <python@rcn.com> | 2009-02-16 20:39:12 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2009-02-16 20:39:12 +0000 |
commit | b21d8109af7b6b3577e566e8c485ec5bcde20181 (patch) | |
tree | 03231364353c78206be77c05d95e366bf5df9580 /Lib/test/test_itertools.py | |
parent | afb5a48be22c118bcba108d481cfbc91e27295ee (diff) | |
download | cpython-git-b21d8109af7b6b3577e566e8c485ec5bcde20181.tar.gz |
Add GC support to count() objects. Backport candidate.
Diffstat (limited to 'Lib/test/test_itertools.py')
-rw-r--r-- | Lib/test/test_itertools.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py index ce5c898788..a33939eb20 100644 --- a/Lib/test/test_itertools.py +++ b/Lib/test/test_itertools.py @@ -966,6 +966,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) |