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
bf4806ba
Commit
bf4806ba
authored
Jul 21, 2007
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SF patch# 1757758 by Alexandre Vassalotti, fixing test_ucn.
parent
b8b108f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Lib/test/test_ucn.py
Lib/test/test_ucn.py
+6
-6
No files found.
Lib/test/test_ucn.py
View file @
bf4806ba
...
...
@@ -17,7 +17,7 @@ class UnicodeNamesTest(unittest.TestCase):
# Helper that put all \N escapes inside eval'd raw strings,
# to make sure this script runs even if the compiler
# chokes on \N escapes
res
=
eval
(
r'
u
"\
N{%s}
"'
%
name
)
res
=
eval
(
r'"\
N{%s}
"'
%
name
)
self
.
assertEqual
(
res
,
code
)
return
res
...
...
@@ -115,26 +115,26 @@ class UnicodeNamesTest(unittest.TestCase):
self
.
assertRaises
(
TypeError
,
unicodedata
.
lookup
)
self
.
assertRaises
(
KeyError
,
unicodedata
.
lookup
,
'unknown'
)
def
test_strict_eror_handling
(
self
):
def
test_strict_er
r
or_handling
(
self
):
# bogus character name
self
.
assertRaises
(
UnicodeError
,
str
,
"
\
\
N{blah}"
,
'unicode-escape'
,
'strict'
str
,
b
"
\
\
N{blah}"
,
'unicode-escape'
,
'strict'
)
# long bogus character name
self
.
assertRaises
(
UnicodeError
,
str
,
"
\
\
N{%s}"
%
(
"x"
*
100000
),
'unicode-escape'
,
'strict'
str
,
bytes
(
"
\
\
N{%s}"
%
(
"x"
*
100000
)
),
'unicode-escape'
,
'strict'
)
# missing closing brace
self
.
assertRaises
(
UnicodeError
,
str
,
"
\
\
N{SPACE"
,
'unicode-escape'
,
'strict'
str
,
b
"
\
\
N{SPACE"
,
'unicode-escape'
,
'strict'
)
# missing opening brace
self
.
assertRaises
(
UnicodeError
,
str
,
"
\
\
NSPACE"
,
'unicode-escape'
,
'strict'
str
,
b
"
\
\
NSPACE"
,
'unicode-escape'
,
'strict'
)
def
test_main
():
...
...
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