Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
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.