diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-11-20 19:04:17 +0000 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-11-20 19:04:17 +0000 |
commit | b3aedd48621ed9d33b5f42f946b256bce4a50673 (patch) | |
tree | 2297c8ebce1b09621e1d98096c1603896d9a0f0c /Lib/test/test_getargs2.py | |
parent | b8bc439b2093add9b313bcca2cc507a2d0e87764 (diff) | |
download | cpython-git-b3aedd48621ed9d33b5f42f946b256bce4a50673.tar.gz |
#9424: Replace deprecated assert* methods in the Python test suite.
Diffstat (limited to 'Lib/test/test_getargs2.py')
-rw-r--r-- | Lib/test/test_getargs2.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_getargs2.py b/Lib/test/test_getargs2.py index d751c1ac24..e8f4fc23f3 100644 --- a/Lib/test/test_getargs2.py +++ b/Lib/test/test_getargs2.py @@ -220,7 +220,7 @@ class Tuple_TestCase(unittest.TestCase): from _testcapi import getargs_tuple ret = getargs_tuple(1, (2, 3)) - self.assertEquals(ret, (1,2,3)) + self.assertEqual(ret, (1,2,3)) # make sure invalid tuple arguments are handled correctly class seq: @@ -233,28 +233,28 @@ class Tuple_TestCase(unittest.TestCase): class Keywords_TestCase(unittest.TestCase): def test_positional_args(self): # using all positional args - self.assertEquals( + self.assertEqual( getargs_keywords((1,2), 3, (4,(5,6)), (7,8,9), 10), (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) ) def test_mixed_args(self): # positional and keyword args - self.assertEquals( + self.assertEqual( getargs_keywords((1,2), 3, (4,(5,6)), arg4=(7,8,9), arg5=10), (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) ) def test_keyword_args(self): # all keywords - self.assertEquals( + self.assertEqual( getargs_keywords(arg1=(1,2), arg2=3, arg3=(4,(5,6)), arg4=(7,8,9), arg5=10), (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) ) def test_optional_args(self): # missing optional keyword args, skipping tuples - self.assertEquals( + self.assertEqual( getargs_keywords(arg1=(1,2), arg2=3, arg5=10), (1, 2, 3, -1, -1, -1, -1, -1, -1, 10) ) @@ -264,7 +264,7 @@ class Keywords_TestCase(unittest.TestCase): try: getargs_keywords(arg1=(1,2)) except TypeError as err: - self.assertEquals(str(err), "Required argument 'arg2' (pos 2) not found") + self.assertEqual(str(err), "Required argument 'arg2' (pos 2) not found") else: self.fail('TypeError should have been raised') @@ -272,7 +272,7 @@ class Keywords_TestCase(unittest.TestCase): try: getargs_keywords((1,2),3,(4,(5,6)),(7,8,9),10,111) except TypeError as err: - self.assertEquals(str(err), "function takes at most 5 arguments (6 given)") + self.assertEqual(str(err), "function takes at most 5 arguments (6 given)") else: self.fail('TypeError should have been raised') @@ -281,7 +281,7 @@ class Keywords_TestCase(unittest.TestCase): try: getargs_keywords((1,2),3,arg5=10,arg666=666) except TypeError as err: - self.assertEquals(str(err), "'arg666' is an invalid keyword argument for this function") + self.assertEqual(str(err), "'arg666' is an invalid keyword argument for this function") else: self.fail('TypeError should have been raised') @@ -289,7 +289,7 @@ class Keywords_TestCase(unittest.TestCase): try: getargs_keywords((1,2), 3, (4,(5,6)), (7,8,9), **{'\uDC80': 10}) except TypeError as err: - self.assertEquals(str(err), "'\udc80' is an invalid keyword argument for this function") + self.assertEqual(str(err), "'\udc80' is an invalid keyword argument for this function") else: self.fail('TypeError should have been raised') |