mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
thanks to ast.literal_eval the order how test results are defined, doesn't matter anymore
This commit is contained in:
@@ -44,7 +44,7 @@ arr.count(1)
|
|||||||
# -----------------
|
# -----------------
|
||||||
dic = {}
|
dic = {}
|
||||||
|
|
||||||
#? ['clear', 'copy']
|
#? ['copy', 'clear']
|
||||||
dic.c
|
dic.c
|
||||||
|
|
||||||
dic2 = dict(a=1, b=2)
|
dic2 = dict(a=1, b=2)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import traceback
|
|||||||
os.chdir(os.path.dirname(os.path.abspath(__file__)) + '/..')
|
os.chdir(os.path.dirname(os.path.abspath(__file__)) + '/..')
|
||||||
sys.path.append('.')
|
sys.path.append('.')
|
||||||
|
|
||||||
from _compatibility import unicode, BytesIO, reduce
|
from _compatibility import unicode, BytesIO, reduce, literal_eval
|
||||||
|
|
||||||
import functions
|
import functions
|
||||||
import debug
|
import debug
|
||||||
@@ -32,8 +32,8 @@ def run_completion_test(correct, source, line_nr, line, path):
|
|||||||
return 1
|
return 1
|
||||||
else:
|
else:
|
||||||
# TODO remove set! duplicates should not be normal
|
# TODO remove set! duplicates should not be normal
|
||||||
comp_str = str(sorted(set([c.word for c in completions])))
|
comp_str = set([c.word for c in completions])
|
||||||
if comp_str != correct:
|
if comp_str != set(literal_eval(correct)):
|
||||||
print('Solution @%s not right, received %s, wanted %s'\
|
print('Solution @%s not right, received %s, wanted %s'\
|
||||||
% (line_nr - 1, comp_str, correct))
|
% (line_nr - 1, comp_str, correct))
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user