Skip to content

Commit

Permalink
add bpo-42536 style test for gc tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja committed Apr 24, 2024
1 parent f653f22 commit ea0cfd6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Lib/test/test_itertools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1821,6 +1821,13 @@ def test_zip_longest_result_gc(self):
gc.collect()
self.assertTrue(gc.is_tracked(next(it)))

@support.cpython_only
def test_pairwise_result_gc(self):
# Ditto for pairwise.
it = pairwise([None, None])
gc.collect()
self.assertTrue(gc.is_tracked(next(it)))

@support.cpython_only
def test_immutable_types(self):
from itertools import _grouper, _tee, _tee_dataobject
Expand Down

0 comments on commit ea0cfd6

Please sign in to comment.