diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-11-20 19:04:17 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-11-20 19:04:17 (GMT) |
commit | b3aedd48621ed9d33b5f42f946b256bce4a50673 (patch) | |
tree | 2297c8ebce1b09621e1d98096c1603896d9a0f0c /Lib/test/test_builtin.py | |
parent | b8bc439b2093add9b313bcca2cc507a2d0e87764 (diff) | |
download | cpython-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.py | 12 |
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') |