[Python-checkins] python/dist/src/Lib/email/test test_email.py,1.3,1.4
bwarsaw@users.sourceforge.net
bwarsaw@users.sourceforge.net
2002年8月20日 05:54:09 -0700
Update of /cvsroot/python/python/dist/src/Lib/email/test
In directory usw-pr-cvs1:/tmp/cvs-serv19987
Modified Files:
test_email.py
Log Message:
test_three_lines(): Test case reported by Andrew McNamara. Works in
email 2.2 but fails in email 1.0.
Index: test_email.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_email.py 23 Jul 2002 19:46:35 -0000 1.3
--- test_email.py 20 Aug 2002 12:54:07 -0000 1.4
***************
*** 1741,1744 ****
--- 1741,1752 ----
neq(part2a.get_payload(), 'message 2\n')
+ def test_three_lines(self):
+ # A bug report by Andrew McNamara
+ lines = ['From: Andrew Person <aperson@dom.ain',
+ 'Subject: Test',
+ 'Date: 2002年8月20日 16:43:45 +1000']
+ msg = email.message_from_string(NL.join(lines))
+ self.assertEqual(msg['date'], 'Tue, 20 Aug 2002 16:43:45 +1000')
+