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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
93551a15
Commit
93551a15
authored
Jul 20, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Py3 test fixes
parent
80c100a5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
tests/run/flatin.pyx
tests/run/flatin.pyx
+4
-4
tests/run/withstat.pyx
tests/run/withstat.pyx
+5
-5
No files found.
tests/run/flatin.pyx
View file @
93551a15
...
@@ -23,9 +23,9 @@ __doc__ = u"""
...
@@ -23,9 +23,9 @@ __doc__ = u"""
"""
"""
def
test_in
(
s
):
def
test_in
(
s
):
if
s
in
(
'ABC'
,
'BCD'
):
if
s
in
(
u'ABC'
,
u
'BCD'
):
return
1
return
1
elif
s
.
upper
()
in
(
'ABC'
,
'BCD'
):
elif
s
.
upper
()
in
(
u'ABC'
,
u
'BCD'
):
return
2
return
2
elif
len
(
s
)
in
(
1
,
2
):
elif
len
(
s
)
in
(
1
,
2
):
return
3
return
3
...
@@ -35,9 +35,9 @@ def test_in(s):
...
@@ -35,9 +35,9 @@ def test_in(s):
return
5
return
5
def
test_not_in
(
s
):
def
test_not_in
(
s
):
if
s
not
in
(
'ABC'
,
'BCD'
,
'CDE'
,
'CDEF'
):
if
s
not
in
(
u'ABC'
,
u'BCD'
,
u'CDE'
,
u
'CDEF'
):
return
1
return
1
elif
s
.
upper
()
not
in
(
'ABC'
,
'BCD'
,
'CDEF'
):
elif
s
.
upper
()
not
in
(
u'ABC'
,
u'BCD'
,
u
'CDEF'
):
return
2
return
2
elif
len
(
s
)
not
in
[
3
]:
elif
len
(
s
)
not
in
[
3
]:
return
3
return
3
...
...
tests/run/withstat.pyx
View file @
93551a15
...
@@ -49,20 +49,20 @@ class ContextManager:
...
@@ -49,20 +49,20 @@ class ContextManager:
return
self
.
value
return
self
.
value
def
no_as
():
def
no_as
():
with
ContextManager
(
"value"
):
with
ContextManager
(
u
"value"
):
print
"hello"
print
u
"hello"
def
basic
():
def
basic
():
with
ContextManager
(
"value"
)
as
x
:
with
ContextManager
(
u
"value"
)
as
x
:
print
x
print
x
def
with_exception
(
exit_ret
):
def
with_exception
(
exit_ret
):
try
:
try
:
with
ContextManager
(
"value"
,
exit_ret
=
exit_ret
)
as
value
:
with
ContextManager
(
u
"value"
,
exit_ret
=
exit_ret
)
as
value
:
print
value
print
value
raise
MyException
()
raise
MyException
()
except
:
except
:
print
"outer except"
print
u
"outer except"
def
multitarget
():
def
multitarget
():
with
ContextManager
((
1
,
2
,
(
3
,
(
4
,
5
))))
as
(
a
,
b
,
(
c
,
(
d
,
e
))):
with
ContextManager
((
1
,
2
,
(
3
,
(
4
,
5
))))
as
(
a
,
b
,
(
c
,
(
d
,
e
))):
...
...
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