mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
Test for error recovery with try statements.
This commit is contained in:
@@ -186,3 +186,28 @@ invalid
|
|||||||
invalid = ,call
|
invalid = ,call
|
||||||
#?
|
#?
|
||||||
invalid
|
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