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
0c80eabb
Commit
0c80eabb
authored
Apr 23, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved test case
parent
06b31a13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
8 deletions
+29
-8
tests/run/trybreak.pyx
tests/run/trybreak.pyx
+29
-8
No files found.
tests/run/trybreak.pyx
View file @
0c80eabb
__doc__
=
u"""
>>> print(foo())
a
"""
# Indirectly makes sure the cleanup happens correctly on breaking.
def
foo
():
for
x
in
"abc"
:
def
try_except_break
():
"""
>>> print(try_except_break())
a
"""
for
x
in
list
(
"abc"
):
try
:
x
()
except
:
break
for
x
in
"abc"
:
return
x
def
try_break_except
():
"""
>>> print(try_break_except())
a
"""
for
x
in
list
(
"abc"
):
try
:
break
except
:
pass
return
x
def
try_no_break_except_return
():
"""
>>> print(try_no_break_except_return())
a
"""
for
x
in
list
(
"abc"
):
try
:
x
()
break
except
:
return
x
return
x
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