summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d/next
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-07-22 07:59:00 (GMT)
committerChris Withers <chris@withers.org>2019-07-22 07:59:00 (GMT)
commit22fd679dc363bfcbda336775da16aff4d6fcb33f (patch)
tree65c79998fdff2daf44568b665a1a7b40e53da384 /Misc/NEWS.d/next
parent24b5b360faf306ef67419dfe5d49ff22dbe827b1 (diff)
downloadcpython-22fd679dc363bfcbda336775da16aff4d6fcb33f.zip
cpython-22fd679dc363bfcbda336775da16aff4d6fcb33f.tar.gz
cpython-22fd679dc363bfcbda336775da16aff4d6fcb33f.tar.bz2
bpo-21478: Record calls to parent when autospecced objects are used as child with attach_mock (GH 14688) (GH-14902)
* Clear name and parent of mock in autospecced objects used with attach_mock * Add NEWS entry * Fix reversed order of comparison * Test child and standalone function calls * Use a helper function extracting mock to avoid code duplication and refactor tests. (cherry picked from commit 7397cda99795a4a8d96193d710105e77a07b7411) Co-authored-by: Xtreak <tir.karthi@gmail.com>
Diffstat (limited to 'Misc/NEWS.d/next')
-rw-r--r--Misc/NEWS.d/next/Library/2019-07-10-23-07-11.bpo-21478.cCw9rF.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2019-07-10-23-07-11.bpo-21478.cCw9rF.rst b/Misc/NEWS.d/next/Library/2019-07-10-23-07-11.bpo-21478.cCw9rF.rst
new file mode 100644
index 0000000..0ac9b8e
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2019-07-10-23-07-11.bpo-21478.cCw9rF.rst
@@ -0,0 +1,2 @@
+Record calls to parent when autospecced object is attached to a mock using
+:func:`unittest.mock.attach_mock`. Patch by Karthikeyan Singaravelan.