Optimize the test for issue #13454.

Now it requires almost 4x less memory and is almost 2x faster.
This commit is contained in:
Serhiy Storchaka 2013-01-26 11:52:06 +02:00
parent ace3ad3bf7
commit 5bb893c44b
1 changed files with 2 additions and 4 deletions

View File

@ -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):