diff options
author | Barry Warsaw <barry@python.org> | 2003-05-08 03:34:01 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2003-05-08 03:34:01 (GMT) |
commit | f8b3e1f76e5a1ce80f54ecc4a4753582647f0ef9 (patch) | |
tree | 4a3b48643764225cbc77729f55fbc72922d98786 | |
parent | b5dc39f02c47d561110171e014c340844f4a52b3 (diff) | |
download | cpython-f8b3e1f76e5a1ce80f54ecc4a4753582647f0ef9.zip cpython-f8b3e1f76e5a1ce80f54ecc4a4753582647f0ef9.tar.gz cpython-f8b3e1f76e5a1ce80f54ecc4a4753582647f0ef9.tar.bz2 |
A couple of new parsedate test cases.
-rw-r--r-- | Lib/email/test/test_email.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index 8eaa85e..7e630bf 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -1877,6 +1877,16 @@ class TestMiscellaneous(unittest.TestCase): self.assertEqual(Utils.parsedate('Wed,3 Apr 2002 14:58:26 +0800'), Utils.parsedate('Wed, 3 Apr 2002 14:58:26 +0800')) + 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)) + + 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)) + def test_parseaddr_empty(self): self.assertEqual(Utils.parseaddr('<>'), ('', '')) self.assertEqual(Utils.formataddr(Utils.parseaddr('<>')), '') |