summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_augassign.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-11-21 13:34:58 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-11-21 13:34:58 (GMT)
commit2623a37852153363335956afab010cb0beb7e74e (patch)
treee443a19bb7a87adc2158ef2e32da5c2f3b21936c /Lib/test/test_augassign.py
parent40a92f5c65767d80ebc3b3be2c2ccfc5db3afb7b (diff)
downloadcpython-2623a37852153363335956afab010cb0beb7e74e.zip
cpython-2623a37852153363335956afab010cb0beb7e74e.tar.gz
cpython-2623a37852153363335956afab010cb0beb7e74e.tar.bz2
Merged revisions 86596 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #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.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/Lib/test/test_augassign.py b/Lib/test/test_augassign.py
index 0292a95..059e8b7 100644
--- a/Lib/test/test_augassign.py
+++ b/Lib/test/test_augassign.py
@@ -19,10 +19,10 @@ class AugAssignTest(unittest.TestCase):
x /= 2
if 1/2 == 0:
# classic division
- self.assertEquals(x, 3)
+ self.assertEqual(x, 3)
else:
# new-style division (with -Qnew)
- self.assertEquals(x, 3.0)
+ self.assertEqual(x, 3.0)
def test_with_unpacking(self):
self.assertRaises(SyntaxError, compile, "x, b += 3", "<test>", "exec")
@@ -40,9 +40,9 @@ class AugAssignTest(unittest.TestCase):
x[0] ^= 1
x[0] /= 2
if 1/2 == 0:
- self.assertEquals(x[0], 3)
+ self.assertEqual(x[0], 3)
else:
- self.assertEquals(x[0], 3.0)
+ self.assertEqual(x[0], 3.0)
def testInDict(self):
x = {0: 2}
@@ -57,23 +57,23 @@ class AugAssignTest(unittest.TestCase):
x[0] ^= 1
x[0] /= 2
if 1/2 == 0:
- self.assertEquals(x[0], 3)
+ self.assertEqual(x[0], 3)
else:
- 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):
@@ -101,14 +101,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
@@ -116,7 +116,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):
@@ -284,7 +284,7 @@ class AugAssignTest(unittest.TestCase):
1 << x
x <<= 1
- test_self.assertEquals(output, '''\
+ test_self.assertEqual(output, '''\
__add__ called
__radd__ called
__iadd__ called