forked from VimPlug/jedi
Get rid of cwd modifications in tests
This commit is contained in:
@@ -9,6 +9,7 @@ import pytest
|
||||
import jedi
|
||||
from jedi.api.environment import get_system_environment, InterpreterEnvironment
|
||||
from jedi._compatibility import py_version
|
||||
from test.helpers import test_dir
|
||||
|
||||
collect_ignore = [
|
||||
'setup.py',
|
||||
@@ -109,6 +110,12 @@ def Script(environment):
|
||||
return partial(jedi.Script, environment=environment)
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def ScriptWithProject(Script):
|
||||
project = jedi.Project(test_dir)
|
||||
return partial(jedi.Script, project=project)
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def get_names(Script):
|
||||
return lambda code, **kwargs: Script(code).get_names(**kwargs)
|
||||
|
||||
Reference in New Issue
Block a user