We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When InEpsilonSlice takes a custom error message and the assertion fails, the custom message isn't displayed.
InEpsilonSlice
The issue is that in InEpsilonSlice implementation, msgAndArgs isn't passed to InEpsilon when iterating over slice elements:
msgAndArgs
InEpsilon
testify/assert/assertions.go
Line 1366 in 0ab3ce1
It should be:
result := InEpsilon(t, actualSlice.Index(i).Interface(), expectedSlice.Index(i).Interface(), epsilon, msgAndArgs...)
Write any test where InEpsilonSlice fails and takes a custom message. The message wouldn't be displayed.
The text was updated successfully, but these errors were encountered:
Here is a reproducer: https://go.dev/play/p/E-lLwVrMXym
Sorry, something went wrong.
Is an issue still relevant? I see mentions in the #1483 PR that was merged.
cc @arjunmahishi
The custom error message is still not shown, this issue is valid.
I've addressed it in #1548 along with the http assertions
Successfully merging a pull request may close this issue.
Bug summary
When
InEpsilonSlice
takes a custom error message and the assertion fails, the custom message isn't displayed.The issue is that in
InEpsilonSlice
implementation,msgAndArgs
isn't passed toInEpsilon
when iterating over slice elements:testify/assert/assertions.go
Line 1366 in 0ab3ce1
It should be:
To reproduce
Write any test where
InEpsilonSlice
fails and takes a custom message. The message wouldn't be displayed.The text was updated successfully, but these errors were encountered: