From: Thomas Wouters Date: Sat, 15 Apr 2006 09:12:14 +0000 (+0000) Subject: Fix test_bisect in the same way as test_itertools: iter() blows up a lot X-Git-Tag: v3.0a1~1452 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ae9afa829ff0b6372b9fd70365653ab6c565b3a;p=python Fix test_bisect in the same way as test_itertools: iter() blows up a lot sooner for new-style broken-iterators, expect it to. --- diff --git a/Lib/test/test_bisect.py b/Lib/test/test_bisect.py index f6e24a6994..302ff639a7 100644 --- a/Lib/test/test_bisect.py +++ b/Lib/test/test_bisect.py @@ -185,11 +185,11 @@ class TestErrorHandling(unittest.TestCase): def test_len_only(self): for f in (bisect_left, bisect_right, insort_left, insort_right): - self.assertRaises(AttributeError, f, LenOnly(), 10) + self.assertRaises(TypeError, f, LenOnly(), 10) def test_get_only(self): for f in (bisect_left, bisect_right, insort_left, insort_right): - self.assertRaises(AttributeError, f, GetOnly(), 10) + self.assertRaises(TypeError, f, GetOnly(), 10) def test_cmp_err(self): seq = [CmpErr(), CmpErr(), CmpErr()]