diff options
author | Xtreak <tir.karthi@gmail.com> | 2019-08-29 06:09:01 (GMT) |
---|---|---|
committer | Chris Withers <chris@withers.org> | 2019-08-29 06:09:01 (GMT) |
commit | c96127821ebda50760e788b1213975a0d5bea37f (patch) | |
tree | 24caeafdabdb90de9234c33134882d227b883a4a /Misc | |
parent | 03acba6f1a851064ba1fa78965ece4354d499c04 (diff) | |
download | cpython-c96127821ebda50760e788b1213975a0d5bea37f.zip cpython-c96127821ebda50760e788b1213975a0d5bea37f.tar.gz cpython-c96127821ebda50760e788b1213975a0d5bea37f.tar.bz2 |
bpo-36871: Ensure method signature is used when asserting mock calls to a method (GH13261)
* Fix call_matcher for mock when using methods
* Add NEWS entry
* Use None check and convert doctest to unittest
* Use better name for mock in tests. Handle _SpecState when the attribute was not accessed and add tests.
* Use reset_mock instead of reinitialization. Change inner class constructor signature for check
* Reword comment regarding call object lookup logic
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2019-05-12-12-58-37.bpo-36871.6xiEHZ.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2019-05-12-12-58-37.bpo-36871.6xiEHZ.rst b/Misc/NEWS.d/next/Library/2019-05-12-12-58-37.bpo-36871.6xiEHZ.rst new file mode 100644 index 0000000..218795f --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-05-12-12-58-37.bpo-36871.6xiEHZ.rst @@ -0,0 +1,3 @@ +Ensure method signature is used instead of constructor signature of a class +while asserting mock object against method calls. Patch by Karthikeyan +Singaravelan. |