diff options
author | Tim Peters <tim.peters@gmail.com> | 2003-03-02 00:31:23 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2003-03-02 00:31:23 (GMT) |
commit | b7bfe4bea458a4a934ac12214e1a403eca1ce7ac (patch) | |
tree | faaa158543a1553f9a16376938c44a1203632dea /Lib/test | |
parent | 44f14b039949005ecc93fd8294933c84fab6f374 (diff) | |
download | cpython-b7bfe4bea458a4a934ac12214e1a403eca1ce7ac.zip cpython-b7bfe4bea458a4a934ac12214e1a403eca1ce7ac.tar.gz cpython-b7bfe4bea458a4a934ac12214e1a403eca1ce7ac.tar.bz2 |
Typo repairs in new code.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_sets.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/test_sets.py b/Lib/test/test_sets.py index d8b7f3f..f1bd3b8 100644 --- a/Lib/test/test_sets.py +++ b/Lib/test/test_sets.py @@ -235,7 +235,7 @@ class TestBinaryOps(unittest.TestCase): self.assertRaises(TypeError, cmp, a, b) # You can view this as a buglet: cmp(a, a) does not raise TypeError, - # because __eq__ is tried before __cmp__, and a.__eq__(a) returns, + # because __eq__ is tried before __cmp__, and a.__eq__(a) returns True, # which Python thinks is good enough to synthesize a cmp() result # without calling __cmp__. self.assertEqual(cmp(a, a), 0) @@ -492,13 +492,17 @@ class TestOnlySetsInBinaryOps(unittest.TestCase): self.assertEqual(self.other != self.set, True) self.assertEqual(self.set != self.other, True) - def test_ge_gt_lt_le(self): - # Unlike the others, this is testing that == and != *are* allowed. + def test_ge_gt_le_lt(self): self.assertRaises(TypeError, lambda: self.set < self.other) self.assertRaises(TypeError, lambda: self.set <= self.other) self.assertRaises(TypeError, lambda: self.set > self.other) self.assertRaises(TypeError, lambda: self.set >= self.other) + self.assertRaises(TypeError, lambda: self.other < self.set) + self.assertRaises(TypeError, lambda: self.other <= self.set) + self.assertRaises(TypeError, lambda: self.other > self.set) + self.assertRaises(TypeError, lambda: self.other >= self.set) + def test_union_update(self): try: self.set |= self.other |