forked from VimPlug/jedi
corrected problem with line numbers
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user