diff options
author | Barry Warsaw <barry@python.org> | 2004-08-07 16:38:40 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2004-08-07 16:38:40 (GMT) |
commit | e8bedeb45b134e7ae033560353ba064738170cd3 (patch) | |
tree | 907fce19729560604ac9a2da59efc4c5a6741fd6 /Lib/email/test | |
parent | 2c178253bd1f78545d412670c59060dc7c676f8c (diff) | |
download | cpython-e8bedeb45b134e7ae033560353ba064738170cd3.zip cpython-e8bedeb45b134e7ae033560353ba064738170cd3.tar.gz cpython-e8bedeb45b134e7ae033560353ba064738170cd3.tar.bz2 |
Resolution of bug #997368, "strftime() backward compatibility".
Specifically, time.strftime() no longer accepts a 0 in the yday position of a
time tuple, since that can crash some platform strftime() implementations.
parsedate_tz(): Change the return value to return 1 in the yday position.
Update tests in test_rfc822.py and test_email.py
Diffstat (limited to 'Lib/email/test')
-rw-r--r-- | Lib/email/test/test_email.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index 1749102..4479fb2 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -2098,12 +2098,12 @@ class TestMiscellaneous(unittest.TestCase): def test_parsedate_no_dayofweek(self): eq = self.assertEqual eq(Utils.parsedate_tz('25 Feb 2003 13:47:26 -0800'), - (2003, 2, 25, 13, 47, 26, 0, 0, 0, -28800)) + (2003, 2, 25, 13, 47, 26, 0, 1, 0, -28800)) def test_parsedate_compact_no_dayofweek(self): eq = self.assertEqual eq(Utils.parsedate_tz('5 Feb 2003 13:47:26 -0800'), - (2003, 2, 5, 13, 47, 26, 0, 0, 0, -28800)) + (2003, 2, 5, 13, 47, 26, 0, 1, 0, -28800)) def test_parseaddr_empty(self): self.assertEqual(Utils.parseaddr('<>'), ('', '')) |