]> 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:54:57 +0000 (06:54 -0800)
committerKarthikeyan Singaravelan <tir.karthi@gmail.com>
Sat, 25 Jan 2020 14:54:57 +0000 (20:24 +0530)
commit71d2b3344f4560ffee14fccd320b20e7add50fec
treebd43bbae3b637fd69218cfeff85500e152e5dfda
parentfd9ce2b924263c1f5c5a2f3f3095fe6ae97c1432
bpo-38473: Handle autospecced functions and methods used with attach_mock (GH-16784) (#18166)

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]