]> granicus.if.org Git - python/commitdiff
Use assertEqual() instead of assertEquals(). (GH-9721)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 5 Oct 2018 18:09:56 +0000 (21:09 +0300)
committerGitHub <noreply@github.com>
Fri, 5 Oct 2018 18:09:56 +0000 (21:09 +0300)
Fixes warnings in tests added in bpo-32117 and bpo-34603.

Lib/ctypes/test/test_win32.py
Lib/test/test_grammar.py

index ee722704a35d7f5ae30a90d3f30bed76ac216611..a2941f3fe0785a3271e40828c2534e1ff348759c 100644 (file)
@@ -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)
 
 
 
index 462e77a0be554a65999a2b066ffde84058933f44..9dd42b4f5dab50bd489345654c2c2f9f49443a89 100644 (file)
@@ -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 ())")