changed the way the tests react, when multiple elements are produced

This commit is contained in:
David Halter
2012-07-12 16:19:47 +02:00
parent c84ca8f897
commit 4739eb6c02
5 changed files with 12 additions and 11 deletions

View File

@@ -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, ""

View File

@@ -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

View File

@@ -75,7 +75,7 @@ def recursion2(a):
return recursion2("")
return a
#? int() str() str()
#? int() str()
recursion2(1)
# -----------------

View File

@@ -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]

View File

@@ -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))