Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
2743fb0a
Commit
2743fb0a
authored
Mar 14, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tests after changing error output
parent
d81e97e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
Cython/Compiler/Options.py
Cython/Compiler/Options.py
+2
-2
tests/errors/e_directives.pyx
tests/errors/e_directives.pyx
+2
-3
No files found.
Cython/Compiler/Options.py
View file @
2743fb0a
...
@@ -116,13 +116,13 @@ def parse_directive_value(name, value, relaxed_bool=False):
...
@@ -116,13 +116,13 @@ def parse_directive_value(name, value, relaxed_bool=False):
value
=
value
.
lower
()
value
=
value
.
lower
()
if
value
in
(
"true"
,
"yes"
):
return
True
if
value
in
(
"true"
,
"yes"
):
return
True
elif
value
in
(
"false"
,
"no"
):
return
False
elif
value
in
(
"false"
,
"no"
):
return
False
raise
ValueError
(
"%s directive must be set to True or False, got
%r
"
%
(
raise
ValueError
(
"%s directive must be set to True or False, got
'%s'
"
%
(
name
,
orig_value
))
name
,
orig_value
))
elif
type
is
int
:
elif
type
is
int
:
try
:
try
:
return
int
(
value
)
return
int
(
value
)
except
ValueError
:
except
ValueError
:
raise
ValueError
(
"%s directive must be set to an integer, got
%r
"
%
(
raise
ValueError
(
"%s directive must be set to an integer, got
'%s'
"
%
(
name
,
orig_value
))
name
,
orig_value
))
elif
type
is
str
:
elif
type
is
str
:
return
str
(
value
)
return
str
(
value
)
...
...
tests/errors/e_directives.pyx
View file @
2743fb0a
...
@@ -9,7 +9,6 @@ print 3
...
@@ -9,7 +9,6 @@ print 3
# cython: boundscheck = true
# cython: boundscheck = true
_ERRORS
=
u"""
_ERRORS
=
u"""
3:0: boundscheck directive must be set to True or False
3:0: boundscheck directive must be set to True or False
, got 'true'
4:0: boundscheck directive must be set to True or False
4:0: boundscheck directive must be set to True or False
, got '9'
"""
"""
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