Issue 540720: test_email fails on Mac in summer (original) (raw)

Created on 2002-04-07 21:55 by jackjansen, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test-email.txt barry,2002-04-08 06:16 More robust test of parsedate()/formatdate() ?
Messages (5)
msg10202 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2002-04-07 21:55
Yes, I kid you not:-) The test of the date/time parser in test_email tries to cater for the fact that the Mac uses localtime (at least, before OSX), but it fails to cater for DST. So, test_email passes in winter, but fails in summer. I think the whole idea of comparing based on a numeric value is not so good. Why not try a roundtrip, or compare against another date coder (time.asctime)?
msg10203 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2002-04-08 06:15
Logged In: YES user_id=12800 What do you think of the attached patch? Is this still a useful test to include?
msg10204 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2002-04-09 21:49
Logged In: YES user_id=45365 Barry, I can't apply the patch, it seems to be against a different version of test_email than what's in the repository (I tried both the trunk and the 22 maintainance branch).
msg10205 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2002-04-15 17:12
Logged In: YES user_id=12800 Actually, forget the patch. I integrated email 2.0 into Python 2.3's cvs and this included the proposed fix. Take a look at test_formatdate() and test_formatdate_localtime() in Lib/test/test_email.py and let me know what you think.
msg10206 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2002-04-22 16:25
Logged In: YES user_id=12800 I believe the patch resolved this issue.
History
Date User Action Args
2022-04-10 16:05:11 admin set github: 36393
2002-04-07 21:55:50 jackjansen create