Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f8b3e1f

Browse files
committed
A couple of new parsedate test cases.
1 parent b5dc39f commit f8b3e1f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Lib/email/test/test_email.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1877,6 +1877,16 @@ def test_parsedate_compact(self):
18771877
self.assertEqual(Utils.parsedate('Wed,3 Apr 2002 14:58:26 +0800'),
18781878
Utils.parsedate('Wed, 3 Apr 2002 14:58:26 +0800'))
18791879

1880+
def test_parsedate_no_dayofweek(self):
1881+
eq = self.assertEqual
1882+
eq(Utils.parsedate_tz('25 Feb 2003 13:47:26 -0800'),
1883+
(2003, 2, 25, 13, 47, 26, 0, 0, 0, -28800))
1884+
1885+
def test_parsedate_compact_no_dayofweek(self):
1886+
eq = self.assertEqual
1887+
eq(Utils.parsedate_tz('5 Feb 2003 13:47:26 -0800'),
1888+
(2003, 2, 5, 13, 47, 26, 0, 0, 0, -28800))
1889+
18801890
def test_parseaddr_empty(self):
18811891
self.assertEqual(Utils.parseaddr('<>'), ('', ''))
18821892
self.assertEqual(Utils.formataddr(Utils.parseaddr('<>')), '')

0 commit comments

Comments
 (0)