Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3fdc889e
Commit
3fdc889e
authored
Jun 29, 2002
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_multilingual(): Test for Header.__unicode__().
parent
8e69bdac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
Lib/test/test_email.py
Lib/test/test_email.py
+22
-0
No files found.
Lib/test/test_email.py
View file @
3fdc889e
...
...
@@ -1749,6 +1749,28 @@ class TestHeader(TestEmailBase):
eq
(
decode_header
(
enc
),
[(
g_head
,
"iso-8859-1"
),
(
cz_head
,
"iso-8859-2"
),
(
utf8_head
,
"utf-8"
)])
# Test for conversion to unicode. BAW: Python 2.1 doesn't support the
# __unicode__() protocol, so do things this way for compatibility.
ustr
=
h
.
__unicode__
()
# For Python 2.2 and beyond
#ustr = unicode(h)
eq
(
ustr
.
encode
(
'utf-8'
),
'Die Mieter treten hier ein werden mit einem Foerderband '
'komfortabel den Korridor entlang, an s
\
xc3
\
xbc
dl
\
xc3
\
xbc
ndischen '
'Wandgem
\
xc3
\
xa4
lden vorbei, gegen die rotierenden Klingen '
'bef
\
xc3
\
xb6
rdert. Finan
\
xc4
\
x8d
ni metropole se hroutily pod '
'tlakem jejich d
\
xc5
\
xaf
vtipu..
\
xe6
\
xad
\
xa3
\
xe7
\
xa2
\
xba
\
xe3
\
x81
'
'
\
xab
\
xe8
\
xa8
\
x80
\
xe3
\
x81
\
x86
\
xe3
\
x81
\
xa8
\
xe7
\
xbf
\
xbb
\
xe8
\
xa8
\
xb3
'
'
\
xe3
\
x81
\
xaf
\
xe3
\
x81
\
x95
\
xe3
\
x82
\
x8c
\
xe3
\
x81
\
xa6
\
xe3
\
x81
\
x84
\
xe3
'
'
\
x81
\
xbe
\
xe3
\
x81
\
x9b
\
xe3
\
x82
\
x93
\
xe3
\
x80
\
x82
\
xe4
\
xb8
\
x80
\
xe9
\
x83
'
'
\
xa8
\
xe3
\
x81
\
xaf
\
xe3
\
x83
\
x89
\
xe3
\
x82
\
xa4
\
xe3
\
x83
\
x84
\
xe8
\
xaa
\
x9e
'
'
\
xe3
\
x81
\
xa7
\
xe3
\
x81
\
x99
\
xe3
\
x81
\
x8c
\
xe3
\
x80
\
x81
\
xe3
\
x81
\
x82
\
xe3
'
'
\
x81
\
xa8
\
xe3
\
x81
\
xaf
\
xe3
\
x81
\
xa7
\
xe3
\
x81
\
x9f
\
xe3
\
x82
\
x89
\
xe3
\
x82
'
'
\
x81
\
xe3
\
x81
\
xa7
\
xe3
\
x81
\
x99
\
xe3
\
x80
\
x82
\
xe5
\
xae
\
x9f
\
xe9
\
x9a
\
x9b
'
'
\
xe3
\
x81
\
xab
\
xe3
\
x81
\
xaf
\
xe3
\
x80
\
x8c
Wenn ist das Nunstuck git '
'und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt '
'gersput.
\
xe3
\
x80
\
x8d
\
xe3
\
x81
\
xa8
\
xe8
\
xa8
\
x80
\
xe3
\
x81
\
xa3
\
xe3
\
x81
'
'
\
xa6
\
xe3
\
x81
\
x84
\
xe3
\
x81
\
xbe
\
xe3
\
x81
\
x99
\
xe3
\
x80
\
x82
'
)
def
test_explicit_maxlinelen
(
self
):
eq
=
self
.
ndiffAssertEqual
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment