pycapnp
pycapnp copied to clipboard
unittest assertEqual has counterintuitive results
the assertion below fails, seems odd
self.assertEqual(
self.interop.MessageType.Date.new_message(year=2016, month=2, day=1)
, self.interop.MessageType.Date.new_message(year=2016, month=2, day=1)
)
I have already loaded a schema as follows
@0x895ad5210a9d686d;
struct Date {
year @0 :Int16;
month @1 :UInt8;
day @2 :UInt8;
}
Unfortunately, equality operators aren't implemented yet. For now, you could do .to_dict()
for each and compare the dicts.
that works fine, thanks.
Can we re-open this? This would be really nice to have.
Sure, though I'm not sure how quickly it'll be implemented.