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
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"""
"""
def
test_in
(
s
):
if
s
in
(
'ABC'
,
'BCD'
):
if
s
in
(
u'ABC'
,
u
'BCD'
):
return
1
elif
s
.
upper
()
in
(
'ABC'
,
'BCD'
):
elif
s
.
upper
()
in
(
u'ABC'
,
u
'BCD'
):
return
2
elif
len
(
s
)
in
(
1
,
2
):
return
3
...
...
@@ -35,9 +35,9 @@ def test_in(s):
return
5
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
elif
s
.
upper
()
not
in
(
'ABC'
,
'BCD'
,
'CDEF'
):
elif
s
.
upper
()
not
in
(
u'ABC'
,
u'BCD'
,
u
'CDEF'
):
return
2
elif
len
(
s
)
not
in
[
3
]:
return
3
...
...
tests/run/withstat.pyx
View file @
93551a15
...
...
@@ -49,20 +49,20 @@ class ContextManager:
return
self
.
value
def
no_as
():
with
ContextManager
(
"value"
):
print
"hello"
with
ContextManager
(
u
"value"
):
print
u
"hello"
def
basic
():
with
ContextManager
(
"value"
)
as
x
:
with
ContextManager
(
u
"value"
)
as
x
:
print
x
def
with_exception
(
exit_ret
):
try
:
with
ContextManager
(
"value"
,
exit_ret
=
exit_ret
)
as
value
:
with
ContextManager
(
u
"value"
,
exit_ret
=
exit_ret
)
as
value
:
print
value
raise
MyException
()
except
:
print
"outer except"
print
u
"outer except"
def
multitarget
():
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