mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 06:24: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]
|
b = [6,7]
|
||||||
|
|
||||||
#? int() int()
|
#? int()
|
||||||
b[8-7]
|
b[8-7]
|
||||||
|
|
||||||
#? list()
|
#? list()
|
||||||
@@ -82,7 +82,7 @@ b4
|
|||||||
(1)
|
(1)
|
||||||
#? int()
|
#? int()
|
||||||
((1))
|
((1))
|
||||||
#? int() int()
|
#? int()
|
||||||
((1)+1)
|
((1)+1)
|
||||||
|
|
||||||
u, v = 1, ""
|
u, v = 1, ""
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# -----------------
|
# -----------------
|
||||||
|
|
||||||
for a in [1,2]:
|
for a in [1,2]:
|
||||||
#? int() int()
|
#? int()
|
||||||
a
|
a
|
||||||
|
|
||||||
for a1 in 1,"":
|
for a1 in 1,"":
|
||||||
@@ -11,15 +11,15 @@ for a1 in 1,"":
|
|||||||
a1
|
a1
|
||||||
|
|
||||||
for a3, b3 in (1,""), (1,""), (1,""):
|
for a3, b3 in (1,""), (1,""), (1,""):
|
||||||
#? int() int() int()
|
#? int()
|
||||||
a3
|
a3
|
||||||
#? str() str() str()
|
#? str()
|
||||||
b3
|
b3
|
||||||
|
|
||||||
for a4, (b4, c4) in (1,("", list)), (1,("", list)):
|
for a4, (b4, c4) in (1,("", list)), (1,("", list)):
|
||||||
#? int() int()
|
#? int()
|
||||||
a4
|
a4
|
||||||
#? str() str()
|
#? str()
|
||||||
b4
|
b4
|
||||||
#? list
|
#? list
|
||||||
c4
|
c4
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ def recursion2(a):
|
|||||||
return recursion2("")
|
return recursion2("")
|
||||||
return a
|
return a
|
||||||
|
|
||||||
#? int() str() str()
|
#? int() str()
|
||||||
recursion2(1)
|
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)
|
source_path, True)
|
||||||
|
|
||||||
# has problems with that (sometimes) very deep nesting.
|
# has problems with that (sometimes) very deep nesting.
|
||||||
#? set()
|
#? set() list()
|
||||||
el = scopes.
|
el = scopes.
|
||||||
|
|
||||||
# get_names_for_scope is also recursion stuff
|
# get_names_for_scope is also recursion stuff
|
||||||
@@ -31,5 +31,6 @@ el = evaluate.get_names_for_scope(1)[0][1]
|
|||||||
#? list()
|
#? list()
|
||||||
el = evaluate.get_names_for_scope()[0][1]
|
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]
|
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
|
return 1
|
||||||
# because the objects have different ids, `repr` it, then compare it.
|
# because the objects have different ids, `repr` it, then compare it.
|
||||||
should_str = sorted(str(r) for r in should_be)
|
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:
|
if is_str != should_str:
|
||||||
print('Solution @%s not right, received %s, wanted %s' \
|
print('Solution @%s not right, received %s, wanted %s' \
|
||||||
% (line_nr - 1, is_str, should_str))
|
% (line_nr - 1, is_str, should_str))
|
||||||
|
|||||||
Reference in New Issue
Block a user