cleaned up the mess in the Definition class

This commit is contained in:
David Halter
2012-09-05 15:22:40 +02:00
parent abcd3f328a
commit d3f36e2ddf
3 changed files with 19 additions and 31 deletions

View File

@@ -72,8 +72,8 @@ def run_definition_test(correct, source, line_nr, index, line, correct_start,
if print_debug:
functions.set_debug_function(debug.print_to_stdout)
# because the objects have different ids, `repr` it, then compare it.
should_str = sorted(str(r) for r in should_be)
is_str = sorted(set(str(r) for r in result))
should_str = set(r.desc_with_module for r in should_be)
is_str = set(r.desc_with_module 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))