Add another rename test for imports
This commit is contained in:
1 parent
faddf412f9
commit
4bc9075d0b
2 files changed
+24
-1
No files matched your search
+3
-1
@@ -11,6 +11,7 @@ import re
|
||||
|
||||
from functools import reduce
|
||||
import jedi
|
||||
from .helpers import test_dir
|
||||
|
||||
|
||||
class RefactoringCase(object):
|
||||
@@ -31,7 +32,8 @@ class RefactoringCase(object):
|
||||
return f_name.replace('.py', '')
|
||||
|
||||
def calculate_diff(self):
|
||||
script = jedi.Script(self._code, path=self._path)
|
||||
project = jedi.Project(os.path.join(test_dir, 'completion'))
|
||||
script = jedi.Script(self._code, path=self._path, project=project)
|
||||
refactor_func = getattr(script, self.refactor_type)
|
||||
refactor_object = refactor_func(self._line_nr, self._index, *self._args)
|
||||
return refactor_object.get_diff()
|
||||
|
||||
Reference in new issue
Block a user