diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-28 18:38:37 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-28 18:38:37 (GMT) |
commit | 9db55004a1bc0c0b3efca69dcd577ff58a86ea16 (patch) | |
tree | f54e4634fe90ad07b2a7c7650a2a06d4327fa4ae /Lib/test/test_itertools.py | |
parent | d7aa5248fb577c7f46d4c0c9b064392bf5c17403 (diff) | |
download | cpython-9db55004a1bc0c0b3efca69dcd577ff58a86ea16.zip cpython-9db55004a1bc0c0b3efca69dcd577ff58a86ea16.tar.gz cpython-9db55004a1bc0c0b3efca69dcd577ff58a86ea16.tar.bz2 |
Make some tests more frienly to MemoryError.
Free memory, unlock hanging threads.
Diffstat (limited to 'Lib/test/test_itertools.py')
-rw-r--r-- | Lib/test/test_itertools.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py index eb51be4..3aed779 100644 --- a/Lib/test/test_itertools.py +++ b/Lib/test/test_itertools.py @@ -1338,8 +1338,12 @@ class TestBasicOps(unittest.TestCase): # Issue 13454: Crash when deleting backward iterator from tee() def test_tee_del_backward(self): forward, backward = tee(repeat(None, 20000000)) - any(forward) # exhaust the iterator - del backward + try: + any(forward) # exhaust the iterator + del backward + except: + del forward, backward + raise def test_StopIteration(self): self.assertRaises(StopIteration, next, zip()) |