-
Notifications
You must be signed in to change notification settings - Fork 714
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
feat: Add equality to Email #739
Conversation
Email objects are defined as equal iff they have the same email and the same name. This is useful for unit tests where we want to verify that the Email objects generated are as expected.
Codecov Report
@@ Coverage Diff @@
## master #739 +/- ##
==========================================
+ Coverage 82.41% 82.48% +0.06%
==========================================
Files 70 70
Lines 2303 2312 +9
Branches 338 340 +2
==========================================
+ Hits 1898 1907 +9
Misses 206 206
Partials 199 199 Continue to review full report at Codecov.
|
If, I may point out, this makes Email objects unhashable, which is inconvenient in some cases. For example getting rid of duplicates in a list of cc's. I suppose this should be considered a regression and should be fixed up? |
@eprykhodko Ack, taking a look. This was definitely not the intent. |
I'm just gonna roll this back. The original change was when the Email class only contained an email address and a name. Later (I don't understand why) other fields were introduced including a subject, substitutions, and a personalization. |
This reverts commit b2ca1f4.
Checklist
Short description of what this PR does:
Email objects are defined as equal iff they have the same email and the same name.
This is useful for unit tests where we want to verify that the Email objects generated are as expected.