1
0
forked from VimPlug/jedi

fully functional classes

This commit is contained in:
David Halter
2012-06-12 00:45:18 +02:00
parent 1400fe877e
commit 9523d3c938
7 changed files with 112 additions and 69 deletions

View File

@@ -55,7 +55,11 @@ def run_definition_test(correct, source, line_nr, line):
should_be = set()
for index in re.finditer('(?: +|$)', correct):
# -1 for the comment, +3 because of the comment start `#? `
should_be |= defs(line_nr-1, index.start() + 3)
start = index.start() + 3
try:
should_be |= defs(line_nr-1, start)
except Exception:
print 'could not resolve %s indent %' % (line_nr - 1, start)
# 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)