mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
invalid.py test changes. Error recovery will be different from the old one.
This commit is contained in:
@@ -10,7 +10,7 @@ there should never be any errors.
|
||||
##? 5
|
||||
's'()
|
||||
|
||||
#? ['upper']
|
||||
#? []
|
||||
str()).upper
|
||||
|
||||
# -----------------
|
||||
@@ -19,16 +19,24 @@ str()).upper
|
||||
def asdf(a or b): # multiple param names
|
||||
return a
|
||||
|
||||
#? int()
|
||||
#?
|
||||
asdf(2)
|
||||
|
||||
asdf = ''
|
||||
|
||||
from a import (b
|
||||
def blub():
|
||||
return 0
|
||||
def openbrace():
|
||||
def wrong_indents():
|
||||
asdf = 3
|
||||
asdf
|
||||
asdf(
|
||||
# doesn't work because of the indent issues.
|
||||
#? str()
|
||||
asdf
|
||||
def openbrace():
|
||||
asdf = 3
|
||||
asdf(
|
||||
#? int()
|
||||
asdf
|
||||
return 1
|
||||
@@ -58,7 +66,7 @@ normalfunc()
|
||||
# dots in param
|
||||
def f(seq1...=None):
|
||||
return seq1
|
||||
#? int()
|
||||
#?
|
||||
f(1)
|
||||
|
||||
@
|
||||
@@ -97,13 +105,15 @@ try:
|
||||
""
|
||||
|
||||
# wrong ternary expression
|
||||
a = ''
|
||||
a = 1 if
|
||||
#? int()
|
||||
#? str()
|
||||
a
|
||||
|
||||
# No completions for for loops without the right syntax
|
||||
for for_local in :
|
||||
for_local
|
||||
#? ['for_local']
|
||||
#? []
|
||||
for_local
|
||||
#?
|
||||
for_local
|
||||
@@ -122,7 +132,7 @@ a3 = [for xyz in]
|
||||
a3[0]
|
||||
|
||||
a3 = [a4 for in 'b']
|
||||
#? str()
|
||||
#?
|
||||
a3[0]
|
||||
|
||||
a3 = [a4 for a in for x in y]
|
||||
@@ -140,7 +150,7 @@ def break(): pass
|
||||
#? int()
|
||||
a[0]
|
||||
|
||||
#? ['real']
|
||||
#? []
|
||||
int()).real
|
||||
|
||||
# -----------------
|
||||
@@ -165,14 +175,14 @@ import datetime as
|
||||
|
||||
call = ''
|
||||
invalid = .call
|
||||
#? str()
|
||||
#?
|
||||
invalid
|
||||
|
||||
invalid = call?.call
|
||||
#? str()
|
||||
#?
|
||||
invalid
|
||||
|
||||
# comma
|
||||
invalid = ,call
|
||||
#? str()
|
||||
#?
|
||||
invalid
|
||||
|
||||
Reference in New Issue
Block a user