Commit 6fef14d7 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Optimize the test for issue #13454.

Now it requires almost 4x less memory and is almost 2x faster.
parent 01b3a08f
...@@ -908,10 +908,8 @@ class TestBasicOps(unittest.TestCase): ...@@ -908,10 +908,8 @@ class TestBasicOps(unittest.TestCase):
# Issue 13454: Crash when deleting backward iterator from tee() # Issue 13454: Crash when deleting backward iterator from tee()
def test_tee_del_backward(self): def test_tee_del_backward(self):
forward, backward = tee(xrange(20000000)) forward, backward = tee(repeat(None, 20000000))
for i in forward: any(forward) # exhaust the iterator
pass
del backward del backward
def test_StopIteration(self): def test_StopIteration(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment