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

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


http://hg.python.org/cpython/rev/04c9c831803b changeset: 68871:04c9c831803b branch: 3.2 parent: 68863:b93559ee4390 parent: 68870:3dbea3fa73fb user: R David Murray <rdmurray at bitdance.com> date: Wed Mar 23 14:27:18 2011 -0400 summary: Merge #11589: add additional tests for the email quoprimime module.

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 @@ -3337,21 +3337,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