[Python-checkins] cpython (3.1): #11589: add additional tests for the email quoprimime module. (original) (raw)

r.david.murray python-checkins at python.org
Wed Mar 23 19:34:35 CET 2011


http://hg.python.org/cpython/rev/3dbea3fa73fb changeset: 68870:3dbea3fa73fb branch: 3.1 parent: 68860:57657393ceaf user: R David Murray <rdmurray at bitdance.com> date: Wed Mar 23 14:19:05 2011 -0400 summary: #11589: add additional tests for the email quoprimime module.

Patch by Michael Henry.

files: Lib/email/test/test_email.py | 194 +++++++++++++++++++++- 1 files changed, 179 insertions(+), 15 deletions(-)

diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -2883,21 +2883,185 @@ c = chr(x) self.assertEqual(quoprimime.unquote(quoprimime.quote(c)), c) - def test_header_encode(self): - eq = self.assertEqual - he = quoprimime.header_encode - eq(he(b'hello'), '=?iso-8859-1?q?hello?=') - eq(he(b'hello', charset='iso-8859-2'), '=?iso-8859-2?q?hello?=') - eq(he(b'hello\nworld'), '=?iso-8859-1?q?hello=0Aworld?=') - # Test a non-ASCII character - eq(he(b'hello\xc7there'), '=?iso-8859-1?q?hello=C7there?=')

-- Repository URL: http://hg.python.org/cpython



More information about the Python-checkins mailing list