mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +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 = {}
|
||||
|
||||
#? ['clear', 'copy']
|
||||
#? ['copy', 'clear']
|
||||
dic.c
|
||||
|
||||
dic2 = dict(a=1, b=2)
|
||||
|
||||
@@ -7,7 +7,7 @@ import traceback
|
||||
os.chdir(os.path.dirname(os.path.abspath(__file__)) + '/..')
|
||||
sys.path.append('.')
|
||||
|
||||
from _compatibility import unicode, BytesIO, reduce
|
||||
from _compatibility import unicode, BytesIO, reduce, literal_eval
|
||||
|
||||
import functions
|
||||
import debug
|
||||
@@ -32,8 +32,8 @@ def run_completion_test(correct, source, line_nr, line, path):
|
||||
return 1
|
||||
else:
|
||||
# TODO remove set! duplicates should not be normal
|
||||
comp_str = str(sorted(set([c.word for c in completions])))
|
||||
if comp_str != correct:
|
||||
comp_str = set([c.word for c in completions])
|
||||
if comp_str != set(literal_eval(correct)):
|
||||
print('Solution @%s not right, received %s, wanted %s'\
|
||||
% (line_nr - 1, comp_str, correct))
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user