diff options
| author | Georg Brandl <georg@python.org> | 2010-02-06 23:18:00 (GMT) |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-02-06 23:18:00 (GMT) |
| commit | d10d8ee2a1f0e4fd01816b5717eb5cc92684fb37 (patch) | |
| tree | ed83b8f0c3b8304b89f5d2c7cc079cf7ada875e2 /Lib/test/test_richcmp.py | |
| parent | 1a0ffe168af3e3e9ab692435ea1d3362329c5a2b (diff) | |
| download | cpython-d10d8ee2a1f0e4fd01816b5717eb5cc92684fb37.zip cpython-d10d8ee2a1f0e4fd01816b5717eb5cc92684fb37.tar.gz cpython-d10d8ee2a1f0e4fd01816b5717eb5cc92684fb37.tar.bz2 | |
Fix various missing import/unbound name errors.
Diffstat (limited to 'Lib/test/test_richcmp.py')
| -rw-r--r-- | Lib/test/test_richcmp.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_richcmp.py b/Lib/test/test_richcmp.py index ed0b497..cc174d8 100644 --- a/Lib/test/test_richcmp.py +++ b/Lib/test/test_richcmp.py @@ -192,13 +192,13 @@ class MiscTest(unittest.TestCase): 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) |
