[Python-checkins] Use assertEqual() instead of assertEquals(). (GH-9721)

Serhiy Storchaka webhook-mailer at python.org
Fri Oct 5 14:10:01 EDT 2018


https://github.com/python/cpython/commit/4642d5f59828e774585e9895b538b24d71b9df8e
commit: 4642d5f59828e774585e9895b538b24d71b9df8e
branch: master
author: Serhiy Storchaka <storchaka at gmail.com>
committer: GitHub <noreply at github.com>
date: 2018-10-05T21:09:56+03:00
summary:

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

Fixes warnings in tests added in bpo-32117 and bpo-34603.

files:
M Lib/ctypes/test/test_win32.py
M Lib/test/test_grammar.py

diff --git a/Lib/ctypes/test/test_win32.py b/Lib/ctypes/test/test_win32.py
index ee722704a35d..a2941f3fe078 100644
--- a/Lib/ctypes/test/test_win32.py
+++ b/Lib/ctypes/test/test_win32.py
@@ -68,7 +68,7 @@ class S(Structure):
             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 462e77a0be55..9dd42b4f5dab 100644
--- a/Lib/test/test_grammar.py
+++ b/Lib/test/test_grammar.py
@@ -989,7 +989,7 @@ def g(): f((yield from ()))
         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 ())")



More information about the Python-checkins mailing list