From 9db55004a1bc0c0b3efca69dcd577ff58a86ea16 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 28 Mar 2015 20:38:37 +0200 Subject: Make some tests more frienly to MemoryError. Free memory, unlock hanging threads. --- Lib/test/test_itertools.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Lib/test/test_itertools.py') diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py index eb51be4dbc..3aed77988e 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()) -- cgit v1.2.1