summaryrefslogtreecommitdiff
path: root/Lib/test/test_itertools.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-02-16 20:39:12 +0000
committerRaymond Hettinger <python@rcn.com>2009-02-16 20:39:12 +0000
commitb21d8109af7b6b3577e566e8c485ec5bcde20181 (patch)
tree03231364353c78206be77c05d95e366bf5df9580 /Lib/test/test_itertools.py
parentafb5a48be22c118bcba108d481cfbc91e27295ee (diff)
downloadcpython-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.py5
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)