mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
#9424: Replace deprecated assert* methods in the Python test suite.
This commit is contained in:
parent
b8bc439b20
commit
b3aedd4862
170 changed files with 2388 additions and 2392 deletions
|
@ -45,7 +45,7 @@ class PyclbrTest(TestCase):
|
|||
def assertEqualsOrIgnored(self, a, b, ignore):
|
||||
''' succeed iff a == b or a in ignore or b in ignore '''
|
||||
if a not in ignore and b not in ignore:
|
||||
self.assertEquals(a, b)
|
||||
self.assertEqual(a, b)
|
||||
|
||||
def checkModule(self, moduleName, module=None, ignore=()):
|
||||
''' succeed iff pyclbr.readmodule_ex(modulename) corresponds
|
||||
|
@ -87,7 +87,7 @@ class PyclbrTest(TestCase):
|
|||
self.assertIsInstance(py_item, (FunctionType, BuiltinFunctionType))
|
||||
if py_item.__module__ != moduleName:
|
||||
continue # skip functions that came from somewhere else
|
||||
self.assertEquals(py_item.__module__, value.module)
|
||||
self.assertEqual(py_item.__module__, value.module)
|
||||
else:
|
||||
self.assertIsInstance(py_item, type)
|
||||
if py_item.__module__ != moduleName:
|
||||
|
@ -116,7 +116,7 @@ class PyclbrTest(TestCase):
|
|||
|
||||
try:
|
||||
self.assertListEq(foundMethods, actualMethods, ignore)
|
||||
self.assertEquals(py_item.__module__, value.module)
|
||||
self.assertEqual(py_item.__module__, value.module)
|
||||
|
||||
self.assertEqualsOrIgnored(py_item.__name__, value.name,
|
||||
ignore)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue