Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
70bc1669
Commit
70bc1669
authored
Apr 08, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move some more tests around
parent
f0dd5232
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
test/tests/generator_abandonment.py
test/tests/generator_abandonment.py
+17
-0
test/tests/nonzero_exceptions.py
test/tests/nonzero_exceptions.py
+3
-1
No files found.
test/tests/generator_abandonment.py
View file @
70bc1669
# expected: reffail
print
any
(
i
==
5
for
i
in
xrange
(
10
))
# TODO: move this back to nonzero_exceptions when it's working again:
class
MyException
(
Exception
):
pass
class
C
(
object
):
def
__init__
(
self
,
x
):
self
.
x
=
x
def
__nonzero__
(
self
):
raise
MyException
(
self
.
x
)
def
__repr__
(
self
):
return
"<C %r>"
%
self
.
x
try
:
print
list
(
1
for
i
in
range
(
5
)
if
C
(
7
))
except
MyException
,
e
:
print
e
test/tests/nonzero_exceptions.py
View file @
70bc1669
# expected: reffail
class
MyException
(
Exception
):
pass
...
...
@@ -43,10 +42,13 @@ try:
except
MyException
,
e
:
print
e
# TODO: reenable this once generator abandonment is working again
"""
try:
print list(1 for i in range(5) if C(7))
except MyException, e:
print e
"""
try
:
print
1
if
C
(
8
)
else
0
...
...
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