mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #1717: Remove cmp. Stage 1: remove all uses of cmp and __cmp__ from
the standard library and tests.
This commit is contained in:
parent
191e850053
commit
a56c467ac3
32 changed files with 210 additions and 216 deletions
|
@ -1036,16 +1036,6 @@ class TestBinaryOps(unittest.TestCase):
|
|||
result = self.set ^ set([8])
|
||||
self.assertEqual(result, set([2, 4, 6, 8]))
|
||||
|
||||
def test_cmp(self):
|
||||
a, b = set('a'), set('b')
|
||||
self.assertRaises(TypeError, cmp, a, b)
|
||||
|
||||
# In py3k, this works!
|
||||
self.assertRaises(TypeError, cmp, a, a)
|
||||
|
||||
self.assertRaises(TypeError, cmp, a, 12)
|
||||
self.assertRaises(TypeError, cmp, "abc", a)
|
||||
|
||||
#==============================================================================
|
||||
|
||||
class TestUpdateOps(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue