Commit 70bc1669 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Move some more tests around

parent f0dd5232
# 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
# 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment