cpython/Lib/unittest
Miss Islington (bot) 1a17a054f6
[3.8] bpo-36871: Handle spec errors in assert_has_calls (GH-16005) (GH-16364)
The fix in PR 13261 handled the underlying issue about the spec for specific methods not being applied correctly, but it didn't fix the issue that was causing the misleading error message.

The code currently grabs a list of responses from _call_matcher (which may include exceptions). But it doesn't reach inside the list when checking if the result is an exception. This results in a misleading error message when one of the provided calls does not match the spec.


https://bugs.python.org/issue36871



Automerge-Triggered-By: @gpshead
(cherry picked from commit b5a7a4f0c2)


Co-authored-by: Samuel Freilich <sfreilich@google.com>


https://bugs.python.org/issue36871



Automerge-Triggered-By: @gpshead
2019-09-24 17:29:17 -07:00
..
test [3.8] bpo-36871: Handle spec errors in assert_has_calls (GH-16005) (GH-16364) 2019-09-24 17:29:17 -07:00
__init__.py
__main__.py
async_case.py [3.8] bpo-36373: Fix deprecation warnings (GH-15889) (GH-15901) 2019-09-11 13:40:36 +03:00
case.py bpo-34596: Fallback to a default reason when @unittest.skip is uncalled (GH-9082) (#15781) 2019-09-09 17:01:14 +02:00
loader.py
main.py
mock.py [3.8] bpo-36871: Handle spec errors in assert_has_calls (GH-16005) (GH-16364) 2019-09-24 17:29:17 -07:00
result.py
runner.py
signals.py
suite.py
util.py