-
Notifications
You must be signed in to change notification settings - Fork 406
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
test: DictWrapper equals method #234
Conversation
Added a equals test to test the `__eq__` method. Related Issue: #233
Codecov Report
@@ Coverage Diff @@
## develop #234 +/- ##
===========================================
+ Coverage 99.78% 99.81% +0.03%
===========================================
Files 76 76
Lines 2768 2768
Branches 112 112
===========================================
+ Hits 2762 2763 +1
+ Misses 6 4 -2
- Partials 0 1 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny change to ease changing later.
Thanks a lot @Nr18 for fast following that other PR by adding this test!
assert DataClassSample({"message": "foo1"}) == DataClassSample({"message": "foo1"}) | ||
assert DataClassSample({"message": "foo1"}) != DataClassSample({"message": "foo2"}) | ||
assert DataClassSample({"message": "foo1"}) is not object() | ||
assert object() is not DataClassSample({"message": "foo1"}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you make this into a literal dict object and reuse it?
This will esse changing that one place only if we must in the future :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, like this you mean: 0ab2786?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's it, awesome. Merging it now
Issue #, if available: #233
Description of changes:
Added a equals test to test the
__eq__
method.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.