[Python-checkins] CVS: python/dist/src/Lib/test test_email.py,1.13,1.14
Barry Warsaw
bwarsaw@users.sourceforge.net
2001年10月25日 15:43:48 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv11655/Lib/test
Modified Files:
test_email.py
Log Message:
A fix for SF bug #472560, extra newlines returned by get_param() when
the separating semi-colon shows up on a continuation line (legal, but
weird).
Bug reported and fixed by Matthew Cowles. Test case and sample email
included.
Index: test_email.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_email.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** test_email.py 2001年10月19日 04:08:59 1.13
--- test_email.py 2001年10月25日 22:43:45 1.14
***************
*** 219,222 ****
--- 219,226 ----
eq(msg.get_param('baz', header='x-header'), 'two')
+ def test_get_param_funky_continuation_lines(self):
+ msg = self._msgobj('msg_22.txt')
+ self.assertEqual(msg.get_payload(1).get_param('name'), 'wibble.JPG')
+
def test_has_key(self):
msg = email.message_from_string('Header: exists')