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
Gwenaël Samain
cython
Commits
3f684dfe
Commit
3f684dfe
authored
Aug 17, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extend try-finally smoke test with some arbitrary syntax constructs
parent
5a40d545
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
tests/run/tryfinally.pyx
tests/run/tryfinally.pyx
+12
-0
No files found.
tests/run/tryfinally.pyx
View file @
3f684dfe
...
@@ -532,8 +532,20 @@ def complex_finally_clause(x, obj):
...
@@ -532,8 +532,20 @@ def complex_finally_clause(x, obj):
from
contextlib
import
contextmanager
from
contextlib
import
contextmanager
with
contextmanager
(
lambda
:
(
yield
1
))()
as
y
:
with
contextmanager
(
lambda
:
(
yield
1
))()
as
y
:
assert
y
==
1
assert
y
==
1
a
=
1
with
nogil
:
if
i
>
0
:
with
gil
:
assert
obj
.
method
a
=
2
# FIXME: prevent deep-copying inner functions
#def closure(l):
# assert l == lobj
#closure()
assert
name
[
0
]
in
string
.
ascii_letters
assert
name
[
0
]
in
string
.
ascii_letters
string
.
Template
(
"-- huhu $name --"
).
substitute
(
**
{
'name'
:
'(%s)'
%
name
})
string
.
Template
(
"-- huhu $name --"
).
substitute
(
**
{
'name'
:
'(%s)'
%
name
})
if
a
:
a
=
3
del
l
[
0
],
lobj
[
0
]
del
l
[
0
],
lobj
[
0
]
assert
all
(
i
==
3
for
i
in
l
),
l
assert
all
(
i
==
3
for
i
in
l
),
l
return
99
return
99
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