diff options
Diffstat (limited to 'Lib/test/test_heapq.py')
-rw-r--r-- | Lib/test/test_heapq.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_heapq.py b/Lib/test/test_heapq.py index 2da4f8c..1916449 100644 --- a/Lib/test/test_heapq.py +++ b/Lib/test/test_heapq.py @@ -136,6 +136,7 @@ class CmpErr: "Dummy element that always raises an error during comparison" def __cmp__(self, other): raise ZeroDivisionError + __eq__ = __ne__ = __lt__ = __le__ = __gt__ = __ge__ = __cmp__ def R(seqn): 'Regular generator' @@ -253,7 +254,7 @@ class TestErrorHandling(unittest.TestCase): def test_iterable_args(self): for f in (nlargest, nsmallest): - for s in ("123", "", range(1000), ('do', 1.2), xrange(2000,2200,5)): + for s in ("123", "", range(1000), (1, 1.2), xrange(2000,2200,5)): for g in (G, I, Ig, L, R): self.assertEqual(f(2, g(s)), f(2,s)) self.assertEqual(f(2, S(s)), []) |