diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-11-20 19:04:17 +0000 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-11-20 19:04:17 +0000 |
commit | b3aedd48621ed9d33b5f42f946b256bce4a50673 (patch) | |
tree | 2297c8ebce1b09621e1d98096c1603896d9a0f0c /Lib/test/test_class.py | |
parent | b8bc439b2093add9b313bcca2cc507a2d0e87764 (diff) | |
download | cpython-git-b3aedd48621ed9d33b5f42f946b256bce4a50673.tar.gz |
#9424: Replace deprecated assert* methods in the Python test suite.
Diffstat (limited to 'Lib/test/test_class.py')
-rw-r--r-- | Lib/test/test_class.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py index 552c521cdf..c7003fbe60 100644 --- a/Lib/test/test_class.py +++ b/Lib/test/test_class.py @@ -436,7 +436,7 @@ class ClassTests(unittest.TestCase): del testme import gc gc.collect() - self.assertEquals(["crab people, crab people"], x) + self.assertEqual(["crab people, crab people"], x) def testBadTypeReturned(self): # return values of some method are type-checked @@ -529,17 +529,17 @@ class ClassTests(unittest.TestCase): a1 = A(1) a2 = A(2) - self.assertEquals(a1.f, a1.f) - self.assertNotEquals(a1.f, a2.f) - self.assertNotEquals(a1.f, a1.g) - self.assertEquals(a1.f, A(1).f) - self.assertEquals(hash(a1.f), hash(a1.f)) - self.assertEquals(hash(a1.f), hash(A(1).f)) - - self.assertNotEquals(A.f, a1.f) - self.assertNotEquals(A.f, A.g) - self.assertEquals(B.f, A.f) - self.assertEquals(hash(B.f), hash(A.f)) + self.assertEqual(a1.f, a1.f) + self.assertNotEqual(a1.f, a2.f) + self.assertNotEqual(a1.f, a1.g) + self.assertEqual(a1.f, A(1).f) + self.assertEqual(hash(a1.f), hash(a1.f)) + self.assertEqual(hash(a1.f), hash(A(1).f)) + + self.assertNotEqual(A.f, a1.f) + self.assertNotEqual(A.f, A.g) + self.assertEqual(B.f, A.f) + self.assertEqual(hash(B.f), hash(A.f)) # the following triggers a SystemError in 2.4 a = A(hash(A.f)^(-1)) |