mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
changed the way the tests react, when multiple elements are produced
This commit is contained in:
@@ -24,7 +24,7 @@ c[0][1]
|
||||
|
||||
b = [6,7]
|
||||
|
||||
#? int() int()
|
||||
#? int()
|
||||
b[8-7]
|
||||
|
||||
#? list()
|
||||
@@ -82,7 +82,7 @@ b4
|
||||
(1)
|
||||
#? int()
|
||||
((1))
|
||||
#? int() int()
|
||||
#? int()
|
||||
((1)+1)
|
||||
|
||||
u, v = 1, ""
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# -----------------
|
||||
|
||||
for a in [1,2]:
|
||||
#? int() int()
|
||||
#? int()
|
||||
a
|
||||
|
||||
for a1 in 1,"":
|
||||
@@ -11,15 +11,15 @@ for a1 in 1,"":
|
||||
a1
|
||||
|
||||
for a3, b3 in (1,""), (1,""), (1,""):
|
||||
#? int() int() int()
|
||||
#? int()
|
||||
a3
|
||||
#? str() str() str()
|
||||
#? str()
|
||||
b3
|
||||
|
||||
for a4, (b4, c4) in (1,("", list)), (1,("", list)):
|
||||
#? int() int()
|
||||
#? int()
|
||||
a4
|
||||
#? str() str()
|
||||
#? str()
|
||||
b4
|
||||
#? list
|
||||
c4
|
||||
|
||||
@@ -75,7 +75,7 @@ def recursion2(a):
|
||||
return recursion2("")
|
||||
return a
|
||||
|
||||
#? int() str() str()
|
||||
#? int() str()
|
||||
recursion2(1)
|
||||
|
||||
# -----------------
|
||||
|
||||
5
test/completion/thirdparty/jedi.py
vendored
5
test/completion/thirdparty/jedi.py
vendored
@@ -14,7 +14,7 @@ scopes, path, dot, like = \
|
||||
source_path, True)
|
||||
|
||||
# has problems with that (sometimes) very deep nesting.
|
||||
#? set()
|
||||
#? set() list()
|
||||
el = scopes.
|
||||
|
||||
# get_names_for_scope is also recursion stuff
|
||||
@@ -31,5 +31,6 @@ el = evaluate.get_names_for_scope(1)[0][1]
|
||||
#? list()
|
||||
el = evaluate.get_names_for_scope()[0][1]
|
||||
|
||||
#? evaluate.Instance()
|
||||
# TODO here should stand evaluate.Instance() and so on.
|
||||
#? []
|
||||
el = evaluate.get_names_for_scope()[0][1][0]
|
||||
|
||||
@@ -65,7 +65,7 @@ def run_definition_test(correct, source, line_nr, line, correct_start):
|
||||
return 1
|
||||
# because the objects have different ids, `repr` it, then compare it.
|
||||
should_str = sorted(str(r) for r in should_be)
|
||||
is_str = sorted(str(r) for r in result)
|
||||
is_str = sorted(set(str(r) for r in result))
|
||||
if is_str != should_str:
|
||||
print('Solution @%s not right, received %s, wanted %s' \
|
||||
% (line_nr - 1, is_str, should_str))
|
||||
|
||||
Reference in New Issue
Block a user