This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Use specific asserts in test_email
Type: enhancement Stage: resolved
Components: email, Tests Versions: Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: barry, python-dev, r.david.murray, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2013-11-14 20:44 by serhiy.storchaka, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_email_asserts.patch serhiy.storchaka, 2013-11-14 20:44 review
test_email_asserts_2.patch serhiy.storchaka, 2013-11-14 23:21 review
test_email_asserts_2-2.7.patch serhiy.storchaka, 2013-11-14 23:23 review
test_email_asserts_2_diff.patch serhiy.storchaka, 2013-11-15 06:55 review
Messages (10)
msg202881 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-11-14 20:44
The proposed patch makes test_email use more specific asserts. This will provide more useful failure report.
msg202905 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-11-14 22:02
Looks fine to me.
msg202910 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-11-14 23:21
Here is larger patch (some asserts were aliased). It is applicable to 3.3 too.
msg202911 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-11-14 23:23
And here is a patch for 2.7.
msg202916 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-11-15 04:06
Any chance of getting a patch with the just the added changes?  I'd rather not fish through the stuff I've already looked at looking for the new stuff.

I'm of two minds about the advisability of backporting this.
msg202921 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-11-15 06:55
Here is a patch which includes only added changes.

Such small and straightforward changes are easier to review by looking at colorized `hg diff` output.
msg202960 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-11-15 17:03
Additional changes look good to me.

Unless (pun intended) Barry objects, I think I'll come down in favor of backporting all of these changes.  The tipping point is that I've always found myself experiencing cognitive dissonance reading the 'unless' calls, since they are the "opposite sense" of all of the other 'assert' style calls.  Having all these tests be the same in all active branches will also help reduce cognitive dissonance while debugging failures :)
msg202964 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2013-11-15 17:58
assertTrue(dtrt)
msg203022 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-11-16 10:57
New changeset 27567e954cbe by Serhiy Storchaka in branch '2.7':
Issue #19590: Use specific asserts in email tests.
http://hg.python.org/cpython/rev/27567e954cbe

New changeset db6ea9abd317 by Serhiy Storchaka in branch '3.3':
Issue #19590: Use specific asserts in email tests.
http://hg.python.org/cpython/rev/db6ea9abd317

New changeset cc8e56886807 by Serhiy Storchaka in branch 'default':
Issue #19590: Use specific asserts in email tests.
http://hg.python.org/cpython/rev/cc8e56886807
msg203023 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-11-16 10:58
Thank you for your review.
History
Date User Action Args
2022-04-11 14:57:53adminsetgithub: 63789
2013-11-16 10:58:31serhiy.storchakasetstatus: open -> closed
messages: + msg203023

assignee: serhiy.storchaka
resolution: fixed
stage: patch review -> resolved
2013-11-16 10:57:04python-devsetnosy: + python-dev
messages: + msg203022
2013-11-15 17:58:07barrysetmessages: + msg202964
2013-11-15 17:03:50r.david.murraysetmessages: + msg202960
2013-11-15 06:55:40serhiy.storchakasetfiles: + test_email_asserts_2_diff.patch

messages: + msg202921
2013-11-15 04:06:19r.david.murraysetmessages: + msg202916
2013-11-14 23:23:07serhiy.storchakasetfiles: + test_email_asserts_2-2.7.patch

messages: + msg202911
versions: + Python 2.7
2013-11-14 23:21:37serhiy.storchakasetfiles: + test_email_asserts_2.patch

messages: + msg202910
versions: + Python 3.3
2013-11-14 22:02:54r.david.murraysetmessages: + msg202905
2013-11-14 20:46:27serhiy.storchakalinkissue16510 dependencies
2013-11-14 20:44:02serhiy.storchakacreate