-
Notifications
You must be signed in to change notification settings - Fork 554
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
ShouldResemble failing for identical values in GitHub action #665
Comments
After a bit of debugging, it looks like when you defer to Why isn't
|
I just encountered what I think is the same issue. It happens when two different int types are compared. func TestSillyDiff(t *testing.T) {
type value struct {
v any
}
v1 := value{int(123)}
v2 := value{int64(123)}
Convey("These things ain't the same", t, func() {
// this passes
So(reflect.DeepEqual(v1, v2), ShouldBeFalse)
// this fails, see message below this block
So(v1, ShouldResemble, v2)
})
} the above prints something like this, which is technically true, but the diff is useless
|
Currently ShouldResemble fails confusingly when the visual diff of two items is the same despite DeepEquals being false. See more context in comments in the PR, or at these issues smarty#50 smartystreets/goconvey#665
Using go 1.19 (also happened with go 1.18) and goconvey v1.7.2 both locally and in a GitHub action, my tests pass locally but fail in GitHub:
https://github.com/wtsi-ssg/wrstat/runs/7804713143?check_suite_focus=true
You will note that the "Expected" and "Actual" strings that it prints out are actually identical.
Why would this be happening, and what can I do about it?
The text was updated successfully, but these errors were encountered: