bpo-40421: test_capi uses assertEqual(), not assertEquals() (GH-32361)

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))
This commit is contained in:
Victor Stinner 2022-04-06 15:12:38 +02:00 committed by GitHub
parent 765f6dee0f
commit 14a9b4895b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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))