1
0
forked from VimPlug/jedi

Add added_sys_path to Project, fixes #1334

This commit is contained in:
Dave Halter
2020-01-31 00:08:24 +01:00
parent 4a1d9a9116
commit 251ff447bc
2 changed files with 14 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ import os
from ..helpers import get_example_dir, set_cwd, root_dir
from jedi import Interpreter
from jedi.api import Project, get_default_project
def test_django_default_project(Script):
@@ -22,3 +23,10 @@ def test_interpreter_project_path():
with set_cwd(dir):
project = Interpreter('', [locals()])._inference_state.project
assert project._path == dir
def test_added_sys_path(inference_state):
project = get_default_project()
p = '/some_random_path'
project.added_sys_path = [p]
assert p in project._get_base_sys_path(inference_state)