-
Notifications
You must be signed in to change notification settings - Fork 1.7k
assert.PanicsWithError: report error message #1400
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests must be fixed to not use assert.CollectT
.
@dolmen, I have performed the needed refactor and rebased. PTAL. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this myself and it works, the change is a worthwhile improvement.
@dolmen are you happy that your comments are addressed?
8a9060b
to
94ddd7e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still LGTM
dolmen's last change requested, to change the variable name mckT to mockT, was completed.
Summary
Always report error message on
PanicsWithError
error message mismatch.Changes
Add
Error message
field to the failure message, that reportspanicErr.Error()
IFF it panicked with an error its message is different from expected.Motivation
Better defect localization in case of nested errors causing panic.
Before:
After:
Related issues
Closes #1399