]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-38473: Handle autospecced functions and methods used with attach_mock (GH-16784...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 25 Jan 2020 14:53:08 +0000 (06:53 -0800)
committerKarthikeyan Singaravelan <tir.karthi@gmail.com>
Sat, 25 Jan 2020 14:53:08 +0000 (20:23 +0530)
commita5906b2bfce9560568dee1dcc3550e74e742dd34
treef9dabecd0a2793efcd729698bf8919875af39e71
parenta23449285430081ea317cc1f203c80c410bbd8b9
bpo-38473: Handle autospecced functions and methods used with attach_mock (GH-16784) (GH-18167)

If an autospecced object is attached using attach_mock the
child would be a function with mock object as attribute from
which signature has to be derived.

(cherry picked from commit 66b00a9d3aacf6ed49412f48743e4913104a2bb3)

Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
Lib/unittest/mock.py
Lib/unittest/test/testmock/testmock.py
Misc/NEWS.d/next/Library/2019-10-14-21-14-55.bpo-38473.uXpVld.rst [new file with mode: 0644]