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_augassign.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_augassign.py')
-rw-r--r-- | Lib/test/test_augassign.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_augassign.py b/Lib/test/test_augassign.py index 3305308..9a59c58 100644 --- a/Lib/test/test_augassign.py +++ b/Lib/test/test_augassign.py @@ -17,7 +17,7 @@ class AugAssignTest(unittest.TestCase): x |= 5 x ^= 1 x /= 2 - self.assertEquals(x, 3.0) + self.assertEqual(x, 3.0) def test_with_unpacking(self): self.assertRaises(SyntaxError, compile, "x, b += 3", "<test>", "exec") @@ -34,7 +34,7 @@ class AugAssignTest(unittest.TestCase): x[0] |= 5 x[0] ^= 1 x[0] /= 2 - self.assertEquals(x[0], 3.0) + self.assertEqual(x[0], 3.0) def testInDict(self): x = {0: 2} @@ -48,21 +48,21 @@ class AugAssignTest(unittest.TestCase): x[0] |= 5 x[0] ^= 1 x[0] /= 2 - self.assertEquals(x[0], 3.0) + self.assertEqual(x[0], 3.0) def testSequences(self): x = [1,2] x += [3,4] x *= 2 - self.assertEquals(x, [1, 2, 3, 4, 1, 2, 3, 4]) + self.assertEqual(x, [1, 2, 3, 4, 1, 2, 3, 4]) x = [1, 2, 3] y = x x[1:2] *= 2 y[1:2] += [1] - self.assertEquals(x, [1, 2, 1, 2, 3]) + self.assertEqual(x, [1, 2, 1, 2, 3]) self.assertTrue(x is y) def testCustomMethods1(self): @@ -90,14 +90,14 @@ class AugAssignTest(unittest.TestCase): self.assertIsInstance(x, aug_test) self.assertTrue(y is not x) - self.assertEquals(x.val, 11) + self.assertEqual(x.val, 11) x = aug_test2(2) y = x x += 10 self.assertTrue(y is x) - self.assertEquals(x.val, 12) + self.assertEqual(x.val, 12) x = aug_test3(3) y = x @@ -105,7 +105,7 @@ class AugAssignTest(unittest.TestCase): self.assertIsInstance(x, aug_test3) self.assertTrue(y is not x) - self.assertEquals(x.val, 13) + self.assertEqual(x.val, 13) def testCustomMethods2(test_self): @@ -269,7 +269,7 @@ class AugAssignTest(unittest.TestCase): 1 << x x <<= 1 - test_self.assertEquals(output, '''\ + test_self.assertEqual(output, '''\ __add__ called __radd__ called __iadd__ called |