mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Test for error recovery with try statements.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user