diff options
author | Barry Warsaw <barry@python.org> | 2003-03-12 03:14:11 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2003-03-12 03:14:11 (GMT) |
commit | ea8f6fa094449a977ae416ab7694e548062bf769 (patch) | |
tree | 048c9be42b012bf60f33b1981c2b68ea77c1372b /Lib/email/test/test_email.py | |
parent | ca53c12c8b7714108bb130651f3cf1a9c6ec6036 (diff) | |
download | cpython-ea8f6fa094449a977ae416ab7694e548062bf769.zip cpython-ea8f6fa094449a977ae416ab7694e548062bf769.tar.gz cpython-ea8f6fa094449a977ae416ab7694e548062bf769.tar.bz2 |
test_whitespace_eater_unicode(): Make this test Python 2.1 compatible.
Diffstat (limited to 'Lib/email/test/test_email.py')
-rw-r--r-- | Lib/email/test/test_email.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index f580f7d..4bc111a 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -1288,7 +1288,10 @@ class TestRFC2047(unittest.TestCase): s = '=?ISO-8859-1?Q?Andr=E9?= Pirard <pirard@dom.ain>' dh = decode_header(s) eq(dh, [('Andr\xe9', 'iso-8859-1'), ('Pirard <pirard@dom.ain>', None)]) - hu = unicode(make_header(dh)).encode('latin-1') + # Python 2.1's unicode() builtin doesn't call the object's + # __unicode__() method. Use the following alternative instead. + #hu = unicode(make_header(dh)).encode('latin-1') + hu = make_header(dh).__unicode__().encode('latin-1') eq(hu, 'Andr\xe9 Pirard <pirard@dom.ain>') |