summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_class.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-11-20 19:04:17 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-11-20 19:04:17 (GMT)
commitb3aedd48621ed9d33b5f42f946b256bce4a50673 (patch)
tree2297c8ebce1b09621e1d98096c1603896d9a0f0c /Lib/test/test_class.py
parentb8bc439b2093add9b313bcca2cc507a2d0e87764 (diff)
downloadcpython-b3aedd48621ed9d33b5f42f946b256bce4a50673.zip
cpython-b3aedd48621ed9d33b5f42f946b256bce4a50673.tar.gz
cpython-b3aedd48621ed9d33b5f42f946b256bce4a50673.tar.bz2
#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.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py
index 552c521..c7003fb 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))