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
Hi there. Firstly, thanks for the great library. I've only run into one gripe so far.
There doesn't seem to be a way to compare only the public fields of a struct. For some reason assert.Equal compares private fields too. Why do I need this? To compare protobuf messages. The public fields are the actual valuable info, and the private fields are implementation details like "sizeCache" which are unimportant but still frequently different.
The text was updated successfully, but these errors were encountered:
Agreed. Python's equivalent of mock.Anything (mock.ANY) also works for equality comparisons. However, I'm not saying that just because it works that way in Python it should also be the same here. That aside, there's already an existing discussion here: #758
Hi there. Firstly, thanks for the great library. I've only run into one gripe so far.
There doesn't seem to be a way to compare only the public fields of a struct. For some reason assert.Equal compares private fields too. Why do I need this? To compare protobuf messages. The public fields are the actual valuable info, and the private fields are implementation details like "sizeCache" which are unimportant but still frequently different.
The text was updated successfully, but these errors were encountered: