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
5970da0a
Commit
5970da0a
authored
Apr 23, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved test case
parent
66a0b841
Changes
1
Show 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 @
5970da0a
__doc__
=
u"""
>>> print(foo())
a
"""
# Indirectly makes sure the cleanup happens correctly on breaking.
# 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
:
try
:
x
()
x
()
except
:
except
:
break
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
:
try
:
x
()
x
()
break
except
:
except
:
return
x
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