summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_builtin.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_builtin.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_builtin.py')
-rw-r--r--Lib/test/test_builtin.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py
index 5a3c35a..d2d4fa9 100644
--- a/Lib/test/test_builtin.py
+++ b/Lib/test/test_builtin.py
@@ -542,11 +542,11 @@ class BuiltinTest(unittest.TestCase):
class X:
def __hash__(self):
return 2**100
- self.assertEquals(type(hash(X())), int)
+ self.assertEqual(type(hash(X())), int)
class Z(int):
def __hash__(self):
return self
- self.assertEquals(hash(Z(42)), hash(42))
+ self.assertEqual(hash(Z(42)), hash(42))
def test_hex(self):
self.assertEqual(hex(16), '0x10')
@@ -777,7 +777,7 @@ class BuiltinTest(unittest.TestCase):
self.assertEqual(next(it), 1)
self.assertRaises(StopIteration, next, it)
self.assertRaises(StopIteration, next, it)
- self.assertEquals(next(it, 42), 42)
+ self.assertEqual(next(it, 42), 42)
class Iter(object):
def __iter__(self):
@@ -786,7 +786,7 @@ class BuiltinTest(unittest.TestCase):
raise StopIteration
it = iter(Iter())
- self.assertEquals(next(it, 42), 42)
+ self.assertEqual(next(it, 42), 42)
self.assertRaises(StopIteration, next, it)
def gen():
@@ -794,9 +794,9 @@ class BuiltinTest(unittest.TestCase):
return
it = gen()
- self.assertEquals(next(it), 1)
+ self.assertEqual(next(it), 1)
self.assertRaises(StopIteration, next, it)
- self.assertEquals(next(it, 42), 42)
+ self.assertEqual(next(it, 42), 42)
def test_oct(self):
self.assertEqual(oct(100), '0o144')