generators used to get names

This commit is contained in:
David Halter
2012-05-02 13:43:45 +02:00
parent 80f2a3518d
commit 532c78b024
5 changed files with 43 additions and 36 deletions

View File

@@ -35,7 +35,7 @@ def completion_test(source):
completions = functions.complete(source, line_nr, 999,
completion_test_dir)
except:
print 'test @%s: %s' % (line_nr, line)
print 'test @#%s: %s' % (line_nr-1, line)
print traceback.format_exc()
fails += 1
else:
@@ -43,8 +43,8 @@ def completion_test(source):
# TODO remove set! duplicates should not be normal
comp_str = str(sorted(set([str(c) for c in completions])))
if comp_str != correct:
print 'Solution on @%s not correct, received %s, wanted %s'\
% (line_nr, comp_str, correct)
print 'Solution on @#%s not right, received %s, wanted %s'\
% (line_nr - 1, comp_str, correct)
#print [(c.name, c.name.parent) for c in completions]
fails += 1
correct = None