]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40421: test_capi uses assertEqual(), not assertEquals() (GH-32361)
authorVictor Stinner <vstinner@python.org>
Wed, 6 Apr 2022 13:12:38 +0000 (15:12 +0200)
committerGitHub <noreply@github.com>
Wed, 6 Apr 2022 13:12:38 +0000 (15:12 +0200)
unittest.TestCase.assertEquals() alias is depracated. Fix the
warning:

Lib/test/test_capi.py:1100: DeprecationWarning: Please use assertEqual instead.
  self.assertEquals(frame.f_locals, _testcapi.frame_getlocals(frame))

Lib/test/test_capi.py

index 238acf94526a3fc403d823eb646540a35d048ba6..714a2d98e9fb5edec87d48e118d5b27fbbf0eaa3 100644 (file)
@@ -1097,7 +1097,7 @@ class Test_FrameAPI(unittest.TestCase):
 
     def test_frame_getters(self):
         frame = self.getframe()
-        self.assertEquals(frame.f_locals, _testcapi.frame_getlocals(frame))
+        self.assertEqual(frame.f_locals, _testcapi.frame_getlocals(frame))
         self.assertIs(frame.f_globals, _testcapi.frame_getglobals(frame))
         self.assertIs(frame.f_builtins, _testcapi.frame_getbuiltins(frame))