Skip to content
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

Merged
merged 3 commits into from
Dec 7, 2020
Merged

test: DictWrapper equals method #234

merged 3 commits into from
Dec 7, 2020

Conversation

Nr18
Copy link
Contributor

@Nr18 Nr18 commented Dec 7, 2020

Issue #, if available: #233

Description of changes:

Added a equals test to test the __eq__ method.

Checklist

Breaking change checklist

RFC issue #:

  • Migration process documented
  • Implement warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Added a equals test to  test the `__eq__` method.

Related Issue: #233
@codecov-io
Copy link

codecov-io commented Dec 7, 2020

Codecov Report

Merging #234 (6bc09b0) into develop (bf4ef14) will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@             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     
Impacted Files Coverage Δ
...lambda_powertools/utilities/data_classes/common.py 93.75% <0.00%> (+3.12%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf4ef14...6bc09b0. Read the comment docs.

Copy link
Contributor

@heitorlessa heitorlessa left a 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!

Comment on lines 52 to 56
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"})

Copy link
Contributor

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 :)

Copy link
Contributor Author

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?

@heitorlessa heitorlessa added the internal Maintenance changes label Dec 7, 2020
@Nr18 Nr18 requested a review from heitorlessa December 7, 2020 18:57
Copy link
Contributor

@heitorlessa heitorlessa left a 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

@heitorlessa heitorlessa merged commit 497d5d7 into aws-powertools:develop Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Maintenance changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants