gh-121027: Make the functools.partial object a method descriptor (GH-121089)

Co-authored-by: d.grigonis <dgrigonis@users.noreply.github.com>
This commit is contained in:
Serhiy Storchaka 2024-07-03 09:02:15 +03:00 committed by GitHub
parent f09d184821
commit ff5806c78e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 28 additions and 40 deletions

View file

@ -405,9 +405,7 @@ class TestPartial:
self.assertEqual(A.meth(3, b=4), ((1, 3), {'a': 2, 'b': 4}))
self.assertEqual(A.cmeth(3, b=4), ((1, A, 3), {'a': 2, 'b': 4}))
self.assertEqual(A.smeth(3, b=4), ((1, 3), {'a': 2, 'b': 4}))
with self.assertWarns(FutureWarning) as w:
self.assertEqual(a.meth(3, b=4), ((1, 3), {'a': 2, 'b': 4}))
self.assertEqual(w.filename, __file__)
self.assertEqual(a.meth(3, b=4), ((1, a, 3), {'a': 2, 'b': 4}))
self.assertEqual(a.cmeth(3, b=4), ((1, A, 3), {'a': 2, 'b': 4}))
self.assertEqual(a.smeth(3, b=4), ((1, 3), {'a': 2, 'b': 4}))