diff --git a/test_concurrent.py b/test_concurrent.py index e3907bf..0781635 100644 --- a/test_concurrent.py +++ b/test_concurrent.py @@ -766,7 +766,13 @@ def test_iterator_failure(self): iterator._dict = BreakingDict() def worker(): - iterator.insert(0, None) + try: + iterator.insert(0, None) + except RuntimeError: + # We want the insert to fail and set the internal flag to + # indicate that a failure occurred. We don't want the error to + # propagate further than this. + pass t = threading.Thread(target=worker) t.start()