Commit b7bfe4be authored by Tim Peters's avatar Tim Peters

Typo repairs in new code.

parent 44f14b03
...@@ -235,7 +235,7 @@ class TestBinaryOps(unittest.TestCase): ...@@ -235,7 +235,7 @@ class TestBinaryOps(unittest.TestCase):
self.assertRaises(TypeError, cmp, a, b) self.assertRaises(TypeError, cmp, a, b)
# You can view this as a buglet: cmp(a, a) does not raise TypeError, # 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 # which Python thinks is good enough to synthesize a cmp() result
# without calling __cmp__. # without calling __cmp__.
self.assertEqual(cmp(a, a), 0) self.assertEqual(cmp(a, a), 0)
...@@ -492,13 +492,17 @@ class TestOnlySetsInBinaryOps(unittest.TestCase): ...@@ -492,13 +492,17 @@ class TestOnlySetsInBinaryOps(unittest.TestCase):
self.assertEqual(self.other != self.set, True) self.assertEqual(self.other != self.set, True)
self.assertEqual(self.set != self.other, True) self.assertEqual(self.set != self.other, True)
def test_ge_gt_lt_le(self): def test_ge_gt_le_lt(self):
# Unlike the others, this is testing that == and != *are* allowed.
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.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): def test_union_update(self):
try: try:
self.set |= self.other self.set |= self.other
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment