You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this was an unintended side-effect of #895.
This makes doing assertions on structs with time.Time pretty rough. I imagine having a time.Time in a struct and being able to do assertions on those structs is a pretty common use case so I think we should make this nicer. :)
I am working on a PR to address this :)
The text was updated successfully, but these errors were encountered:
shawc71
changed the title
Diffs on time.Time objects nested inside structs produce hard to read diffs
Diffs on structs with nested time.Time objects produce hard to read diffs
May 22, 2021
We recently observed tough to read diffs produced by testify on assertion failures on structs when the structs contain nested
time.Time
objects.I have created this repo with this testfile that does a minimal repro of the issue https://github.com/shawc71/testify-issue-demo/blob/master/example_test.go, this uses the latest testify commit on master.
In summary, given a struct like:
the following produces a diff that is 1220 lines+ and unparsable for humans:
I believe this was an unintended side-effect of #895.
This makes doing assertions on structs with time.Time pretty rough. I imagine having a time.Time in a struct and being able to do assertions on those structs is a pretty common use case so I think we should make this nicer. :)
I am working on a PR to address this :)
The text was updated successfully, but these errors were encountered: