]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-102978: Fix mock.patch function signatures for class and staticmethod decorators...
authorTomas R <tomas.roun8@gmail.com>
Thu, 13 Apr 2023 07:37:57 +0000 (09:37 +0200)
committerGitHub <noreply@github.com>
Thu, 13 Apr 2023 07:37:57 +0000 (08:37 +0100)
commit59e0de4903c02e72b329e505fddf1ad9794928bc
tree25631df423f943fc427f277eda233af8ccdfa87e
parent19d2639d1e6478e2e251479d842bdfa2e8272396
gh-102978: Fix mock.patch function signatures for class and staticmethod decorators (#103228)

Fixes unittest.mock.patch not enforcing function signatures for methods
decorated with @classmethod or @staticmethod when patch is called with
autospec=True.
Lib/test/test_unittest/testmock/testhelpers.py
Lib/test/test_unittest/testmock/testpatch.py
Lib/unittest/mock.py
Misc/ACKS
Misc/NEWS.d/next/Library/2023-04-03-23-44-34.gh-issue-102978.gy9eVk.rst [new file with mode: 0644]