]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
A couple of new parsedate test cases.
authorBarry Warsaw <barry@python.org>
Thu, 8 May 2003 03:34:01 +0000 (03:34 +0000)
committerBarry Warsaw <barry@python.org>
Thu, 8 May 2003 03:34:01 +0000 (03:34 +0000)
Lib/email/test/test_email.py

index 8eaa85e17fbecda5c232e88f49306f20d1bb7459..7e630bf35c9ca58ac5ab9dabf5ddc4e015e7da2e 100644 (file)
@@ -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('<>')), '')