Don't use a random grammar for extract

This commit is contained in:
Dave Halter committed 2020-02-27 22:50:30 +01:00
1 parent 140a45081f
commit 0ef8053919
3 files changed
+15 -16

No files matched your search

+2 -2
View File
@@ -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)