Test for error recovery with try statements.

This commit is contained in:
Dave Halter
2015-01-09 18:02:00 +01:00
parent 5334f8dbad
commit f8570b1f03

View File

@@ -186,3 +186,28 @@ invalid
invalid = ,call
#?
invalid
# -----------------
# classes
# -----------------
class BrokenPartsOfClass():
def foo(self):
# This construct contains two places where Jedi with Python 3 can fail.
# It should just ignore those constructs and still execute `bar`.
pass
if 2:
try:
pass
except ValueError, e:
raise TypeError, e
else:
pass
def bar(self):
self.x = 3
return ''
#? str()
BrokenPartsOfClass().bar()