-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
[3.8] bpo-36871: Handle spec errors in assert_has_calls (GH-16005) #16364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
miss-islington
merged 2 commits into
python:3.8
from
miss-islington:backport-b5a7a4f-3.8
Sep 25, 2019
Merged
[3.8] bpo-36871: Handle spec errors in assert_has_calls (GH-16005) #16364
miss-islington
merged 2 commits into
python:3.8
from
miss-islington:backport-b5a7a4f-3.8
Sep 25, 2019
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 b5a7a4f) Co-authored-by: Samuel Freilich <sfreilich@google.com>
I need to manually add the PR #16361 fix in this PR. |
@sfreilich: Status check is done, and it's a success ✅ . |
2 similar comments
@sfreilich: Status check is done, and it's a success ✅ . |
@sfreilich: Status check is done, and it's a success ✅ . |
gpshead
approved these changes
Sep 25, 2019
@miss-islington: Status check is done, and it's a success ✅ . |
gpshead
pushed a commit
to gpshead/cpython
that referenced
this pull request
Sep 25, 2019
…) (pythonGH-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 Co-authored-by: Samuel Freilich <sfreilich@google.com> (cherry picked from commit 1a17a05)
gpshead
added a commit
that referenced
this pull request
Sep 25, 2019
…H-16374) 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 Co-authored-by: Samuel Freilich <sfreilich@google.com> (cherry picked from commit 1a17a05)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 b5a7a4f)
Co-authored-by: Samuel Freilich sfreilich@google.com
https://bugs.python.org/issue36871
Automerge-Triggered-By: @gpshead