From 6e0cc7f15f9439a46ec10623f63d142f0a4cc4ab Mon Sep 17 00:00:00 2001 From: David Halter Date: Mon, 10 Sep 2012 11:25:47 +0200 Subject: [PATCH] fixed one off bug for all tests --- test/run.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/run.py b/test/run.py index d2ddc911..ff7ccad5 100755 --- a/test/run.py +++ b/test/run.py @@ -135,8 +135,9 @@ def run_related_name_test(correct, source, line_nr, index, line, path): print('test @%s: %s' % (line_nr - 1, line)) return 1 else: + correct = correct.strip() comp_str = set('(%s,%s)' % r.start_pos for r in result) - correct = set(correct.strip().split(' ')) + correct = set(correct.split(' ')) if correct else set() if comp_str != correct: print('Solution @%s not right, received %s, wanted %s'\ % (line_nr - 1, comp_str, correct)) @@ -172,7 +173,7 @@ def run_test(source, f_name, lines_to_execute): correct = r.group(2) start += r.regs[2][0] # second group, start index else: - index = len(line) + index = len(line) - 1 # -1 for the \n # if a list is wanted, use the completion test, otherwise the # get_definition test path = completion_test_dir + os.path.sep + f_name