mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
Add GC support to count() objects.
This commit is contained in:
parent
d67c60ff81
commit
d6280f4b78
2 changed files with 19 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue