Commit 4642d5f5 authored by Serhiy Storchaka's avatar Serhiy Storchaka Committed by GitHub

Use assertEqual() instead of assertEquals(). (GH-9721)

Fixes warnings in tests added in bpo-32117 and bpo-34603.
parent 4313a293
...@@ -68,7 +68,7 @@ class ReturnStructSizesTestCase(unittest.TestCase): ...@@ -68,7 +68,7 @@ class ReturnStructSizesTestCase(unittest.TestCase):
for i, f in enumerate(fields): for i, f in enumerate(fields):
value = getattr(res, f[0]) value = getattr(res, f[0])
expected = bytes([ord('a') + i]) expected = bytes([ord('a') + i])
self.assertEquals(value, expected) self.assertEqual(value, expected)
......
...@@ -989,7 +989,7 @@ class GrammarTests(unittest.TestCase): ...@@ -989,7 +989,7 @@ class GrammarTests(unittest.TestCase):
def g(): f((yield from ()), 1) def g(): f((yield from ()), 1)
# Do not require parenthesis for tuple unpacking # Do not require parenthesis for tuple unpacking
def g(): rest = 4, 5, 6; yield 1, 2, 3, *rest 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)")
check_syntax_error(self, "def g(): f(yield 1, 1)") check_syntax_error(self, "def g(): f(yield 1, 1)")
check_syntax_error(self, "def g(): f(yield from ())") check_syntax_error(self, "def g(): f(yield from ())")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment