Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_richcmp.py @ 58770:22358700a4d0 legacy-trunk
Fix various missing import/unbound name errors.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Sat, 06 Feb 2010 23:18:00 +0000 |
| parents | 0dd1aa33265f |
| children | 3a7132f65623 |
line wrap: on
line diff
--- a/Lib/test/test_richcmp.py Sat Feb 06 23:12:19 2010 +0000 +++ b/Lib/test/test_richcmp.py Sat Feb 06 23:18:00 2010 +0000 @@ -192,13 +192,13 @@ def test_misbehavin(self): class Misb: - def __lt__(self, other): return 0 - def __gt__(self, other): return 0 - def __eq__(self, other): return 0 - def __le__(self, other): raise TestFailed, "This shouldn't happen" - def __ge__(self, other): raise TestFailed, "This shouldn't happen" - def __ne__(self, other): raise TestFailed, "This shouldn't happen" - def __cmp__(self, other): raise RuntimeError, "expected" + def __lt__(self_, other): return 0 + def __gt__(self_, other): return 0 + def __eq__(self_, other): return 0 + def __le__(self_, other): self.fail("This shouldn't happen") + def __ge__(self_, other): self.fail("This shouldn't happen") + def __ne__(self_, other): self.fail("This shouldn't happen") + def __cmp__(self_, other): raise RuntimeError, "expected" a = Misb() b = Misb() self.assertEqual(a<b, 0)
