]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-36871: Ensure method signature is used when asserting mock calls to a method...
authorXtreak <tir.karthi@gmail.com>
Thu, 29 Aug 2019 06:09:01 +0000 (11:39 +0530)
committerChris Withers <chris@withers.org>
Thu, 29 Aug 2019 06:09:01 +0000 (07:09 +0100)
commitc96127821ebda50760e788b1213975a0d5bea37f
tree24caeafdabdb90de9234c33134882d227b883a4a
parent03acba6f1a851064ba1fa78965ece4354d499c04
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
Lib/unittest/mock.py
Lib/unittest/test/testmock/testmock.py
Misc/NEWS.d/next/Library/2019-05-12-12-58-37.bpo-36871.6xiEHZ.rst [new file with mode: 0644]