Repository navigation
improv: Added __eq__ function to DictWrapper for better equality checks - #233
Conversation
|
hey @GroovyDan thanks a lot for taking the time in making your first contribution, we appreciate it very much :) LGTM at first glance and can see how it can make tests easier (it'd be great to have one test updated to cover it too). However, I need to triple check the side effects of not having what do you think @michaelbrewer? |
There was a problem hiding this comment.
@GroovyDan nice addition indeed, it did raise a question while looking at it though. (Next to the missing tests that @heitorlessa mentioned)
heitorlessa
left a comment
There was a problem hiding this comment.
One small change required as per @Nr18 pointed out
I've also double checked about equality and hash theory. __hash__ won't be necessary because Dicts are not hashable, so DictWrapper not being hashable with __eq__ isn't an issue in this case.
Co-authored-by: Joris Conijn <jco@woodwing.com>
heitorlessa
left a comment
There was a problem hiding this comment.
Thanks a lot for making the change @GroovyDan - Merging this now.
Issue #, if available:
Description of changes:
This change is to allow easier testing of data classes by adding an eq function to the base DictWrapper class. This new function will check the equality of the data contained in the object opposed to the memory location.
Checklist
Breaking change checklist
RFC issue #:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.