diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-01-25 06:53:08 -0800 |
---|---|---|
committer | Karthikeyan Singaravelan <tir.karthi@gmail.com> | 2020-01-25 20:23:08 +0530 |
commit | a5906b2bfce9560568dee1dcc3550e74e742dd34 (patch) | |
tree | f9dabecd0a2793efcd729698bf8919875af39e71 /Misc | |
parent | a23449285430081ea317cc1f203c80c410bbd8b9 (diff) | |
download | cpython-git-a5906b2bfce9560568dee1dcc3550e74e742dd34.tar.gz |
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>
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2019-10-14-21-14-55.bpo-38473.uXpVld.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2019-10-14-21-14-55.bpo-38473.uXpVld.rst b/Misc/NEWS.d/next/Library/2019-10-14-21-14-55.bpo-38473.uXpVld.rst new file mode 100644 index 0000000000..de80e89e00 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-10-14-21-14-55.bpo-38473.uXpVld.rst @@ -0,0 +1,2 @@ +Use signature from inner mock for autospecced methods attached with +:func:`unittest.mock.attach_mock`. Patch by Karthikeyan Singaravelan. |