[Python-checkins] python/dist/src/Lib/email/test test_email.py, 1.59, 1.60

bwarsaw at users.sourceforge.net bwarsaw at users.sourceforge.net
Sat Aug 7 18:38:51 CEST 2004


Update of /cvsroot/python/python/dist/src/Lib/email/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16756/Lib/email/test

Modified Files:
	test_email.py 
Log Message:
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


Index: test_email.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** test_email.py	7 Aug 2004 15:57:52 -0000	1.59
--- test_email.py	7 Aug 2004 16:38:39 -0000	1.60
***************
*** 2099,2108 ****
          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):
--- 2099,2108 ----
          eq = self.assertEqual
          eq(Utils.parsedate_tz('25 Feb 2003 13:47:26 -0800'),
!            (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, 1, 0, -28800))
  
      def test_parseaddr_empty(self):



More information about the Python-checkins mailing list