1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
|
"""
This file is less about the results and much more about the fact, that no
exception should be thrown.
Basically this file could change depending on the current implementation. But
there should never be any errors.
"""
# wait until keywords are out of definitions (pydoc function).
##? 5
's'()
#? []
str()).upper
# -----------------
# funcs
# -----------------
def asdf(a or b): # multiple param names
return a
#?
asdf(2)
asdf = ''
from a import (b
def blub():
return 0
def wrong_indents():
asdf = 3
asdf
asdf(
# TODO this seems to be wrong now?
##? int()
asdf
def openbrace():
asdf = 3
asdf(
#? int()
asdf
return 1
#? int()
openbrace()
blub([
#? int()
openbrace()
def indentfault():
asd(
indentback
#? []
indentfault().
def openbrace2():
asd(
def normalfunc():
return 1
#? int()
normalfunc()
# dots in param
def f(seq1...=None):
return seq1
#?
f(1)
@
def test_empty_decorator():
return 1
#? int()
test_empty_decorator()
def invalid_param(param=):
#?
param
# -----------------
# flows
# -----------------
# first part not complete (raised errors)
if a
a
else:
#? ['AttributeError']
AttributeError
try
#? ['AttributeError']
except AttributeError
pass
finally:
pass
#? ['isinstance']
if isi
try:
except TypeError:
#? str()
str()
def break(): pass
# wrong ternary expression
a = ''
a = 1 if
#? str()
a
# No completions for for loops without the right syntax
for for_local in :
for_local
#? []
for_local
#?
for_local
# -----------------
# list comprehensions
# -----------------
a2 = [for a2 in [0]]
#?
a2[0]
a3 = [for xyz in]
#?
a3[0]
a3 = [a4 for in 'b']
#?
a3[0]
a3 = [a4 for a in for x in y]
#?
a3[0]
a = [for a in
def break(): pass
#?
a[0]
a = [a for a in [1,2]
def break(): pass
#?
a[0]
#? []
int()).real
# -----------------
# keywords
# -----------------
#! []
as
def empty_assert():
x = 3
assert
#? int()
x
import datetime as
# -----------------
# statements
# -----------------
call = ''
invalid = .call
#?
invalid
invalid = call?.call
#? str()
invalid
# comma
invalid = ,call
#? str()
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()
|