diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py --- a/Lib/test/test_itertools.py +++ b/Lib/test/test_itertools.py @@ -808,6 +808,7 @@ it = islice(it, 1) self.assertIsNotNone(wr()) list(it) # exhaust the iterator + test_support.gc_collect() self.assertIsNone(wr()) def test_takewhile(self):