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
23c9f612
Commit
23c9f612
authored
Oct 22, 2015
by
Berker Peksag
Browse files
Options
Browse Files
Download
Plain Diff
Issue #23981: Update test_unicodedata to use script_helpers
Patch by Christie.
parents
085c2543
33a7fcc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
Lib/test/test_unicodedata.py
Lib/test/test_unicodedata.py
+5
-10
No files found.
Lib/test/test_unicodedata.py
View file @
23c9f612
...
...
@@ -9,8 +9,7 @@
import
sys
import
unittest
import
hashlib
import
subprocess
import
test.support
from
test.support
import
script_helper
encoding
=
'utf-8'
errors
=
'surrogatepass'
...
...
@@ -234,16 +233,12 @@ class UnicodeMiscTest(UnicodeDatabaseTest):
code
=
"import sys;"
\
"sys.modules['unicodedata'] = None;"
\
"""eval("'
\
\
\
\
N{SOFT HYPHEN}'")"""
args
=
[
sys
.
executable
,
"-c"
,
code
]
# We use a subprocess because the unicodedata module may already have
# been loaded in this process.
popen
=
subprocess
.
Popen
(
args
,
stderr
=
subprocess
.
PIPE
)
popen
.
wait
()
self
.
assertEqual
(
popen
.
returncode
,
1
)
# We use a separate process because the unicodedata module may already
# have been loaded in this process.
result
=
script_helper
.
assert_python_failure
(
"-c"
,
code
)
error
=
"SyntaxError: (unicode error)
\
\
N escapes not supported "
\
"(can't load unicodedata module)"
self
.
assertIn
(
error
,
popen
.
stderr
.
read
().
decode
(
"ascii"
))
popen
.
stderr
.
close
()
self
.
assertIn
(
error
,
result
.
err
.
decode
(
"ascii"
))
def
test_decimal_numeric_consistent
(
self
):
# Test that decimal and numeric are consistent,
...
...
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