1
0
forked from VimPlug/jedi

corrected problem with line numbers

This commit is contained in:
David Halter
2013-01-07 00:36:37 +01:00
parent 00f78bc50d
commit 5796496baf

View File

@@ -51,7 +51,7 @@ def run_test(source, f_name, lines_to_execute):
path = refactoring_test_dir + os.path.sep + f_name path = refactoring_test_dir + os.path.sep + f_name
try: try:
script = api.Script(source, line_nr + 1, index, path) script = api.Script(source, line_nr, index, path)
refactor_func = getattr(refactoring, f_name.replace('.py', '')) refactor_func = getattr(refactoring, f_name.replace('.py', ''))
args = (script, new_name) if new_name else (script,) args = (script, new_name) if new_name else (script,)
refactor_object = refactor_func(*args) refactor_object = refactor_func(*args)
@@ -73,7 +73,7 @@ def run_test(source, f_name, lines_to_execute):
if second != result: if second != result:
print('test @%s: not the same result, %s' % (line_nr - 1, name)) print('test @%s: not the same result, %s' % (line_nr - 1, name))
print(' ' + repr(result)) print(' ' + repr(str(result)))
print(' ' + repr(second)) print(' ' + repr(second))
fails += 1 fails += 1
except Exception: except Exception: