summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-02-16 20:50:56 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-02-16 20:50:56 (GMT)
commitd6280f4b78d29dd5dadc7c82702fa7cc17140795 (patch)
tree4cbc5268f1e5575b817f5a42ee7819b7bc20ea0e /Lib/test
parentd67c60ff8116e6c9ac73ad8cd556573a73598b4f (diff)
downloadcpython-d6280f4b78d29dd5dadc7c82702fa7cc17140795.zip
cpython-d6280f4b78d29dd5dadc7c82702fa7cc17140795.tar.gz
cpython-d6280f4b78d29dd5dadc7c82702fa7cc17140795.tar.bz2
Add GC support to count() objects.
Diffstat (limited to 'Lib/test')
-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 812a1ef..c34b915 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)