Use assertEqual() instead of assertEquals(). (GH-9721)
Fixes warnings in tests added in bpo-32117 and bpo-34603.
This commit is contained in:
parent
4313a293da
commit
4642d5f598
|
@ -68,7 +68,7 @@ class ReturnStructSizesTestCase(unittest.TestCase):
|
|||
for i, f in enumerate(fields):
|
||||
value = getattr(res, f[0])
|
||||
expected = bytes([ord('a') + i])
|
||||
self.assertEquals(value, expected)
|
||||
self.assertEqual(value, expected)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -989,7 +989,7 @@ class GrammarTests(unittest.TestCase):
|
|||
def g(): f((yield from ()), 1)
|
||||
# Do not require parenthesis for tuple unpacking
|
||||
def g(): rest = 4, 5, 6; yield 1, 2, 3, *rest
|
||||
self.assertEquals(list(g()), [(1, 2, 3, 4, 5, 6)])
|
||||
self.assertEqual(list(g()), [(1, 2, 3, 4, 5, 6)])
|
||||
check_syntax_error(self, "def g(): f(yield 1)")
|
||||
check_syntax_error(self, "def g(): f(yield 1, 1)")
|
||||
check_syntax_error(self, "def g(): f(yield from ())")
|
||||
|
|
Loading…
Reference in New Issue