summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_itertools.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py
index 66e307d..dfa371e 100644
--- a/Lib/test/test_itertools.py
+++ b/Lib/test/test_itertools.py
@@ -932,10 +932,8 @@ class TestBasicOps(unittest.TestCase):
# Issue 13454: Crash when deleting backward iterator from tee()
def test_tee_del_backward(self):
- forward, backward = tee(range(20000000))
- for i in forward:
- pass
-
+ forward, backward = tee(repeat(None, 20000000))
+ any(forward) # exhaust the iterator
del backward
def test_StopIteration(self):