From 4642d5f59828e774585e9895b538b24d71b9df8e Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Fri, 5 Oct 2018 21:09:56 +0300 Subject: Use assertEqual() instead of assertEquals(). (GH-9721) Fixes warnings in tests added in bpo-32117 and bpo-34603. --- Lib/ctypes/test/test_win32.py | 2 +- Lib/test/test_grammar.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/ctypes/test/test_win32.py b/Lib/ctypes/test/test_win32.py index ee72270..a2941f3 100644 --- a/Lib/ctypes/test/test_win32.py +++ b/Lib/ctypes/test/test_win32.py @@ -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) diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index 462e77a..9dd42b4 100644 --- a/Lib/test/test_grammar.py +++ b/Lib/test/test_grammar.py @@ -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 ())") -- cgit v0.12