mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-29 00:16:52 +08:00
Don't use a random grammar for extract
This commit is contained in:
@@ -31,9 +31,9 @@ class RefactoringCase(object):
|
||||
f_name = os.path.basename(self._path)
|
||||
return f_name.replace('.py', '')
|
||||
|
||||
def refactor(self):
|
||||
def refactor(self, environment):
|
||||
project = jedi.Project(os.path.join(test_dir, 'refactor'))
|
||||
script = jedi.Script(self._code, path=self._path, project=project)
|
||||
script = jedi.Script(self._code, path=self._path, project=project, environment=environment)
|
||||
refactor_func = getattr(script, self.refactor_type)
|
||||
return refactor_func(self._line_nr, self._index, **self._kwargs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user