find_python_environments -> find_system_environments

This commit is contained in:
Dave Halter
2018-04-14 15:46:16 +02:00
parent 45fb770033
commit 336087fcf8
5 changed files with 15 additions and 15 deletions

View File

@@ -125,7 +125,7 @@ from jedi._compatibility import unicode, is_py3
from jedi.api.classes import Definition
from jedi.api.completion import get_user_scope
from jedi import parser_utils
from jedi.api.environment import get_default_environment, get_python_environment
from jedi.api.environment import get_default_environment, get_system_environment
TEST_COMPLETIONS = 0
@@ -435,7 +435,7 @@ if __name__ == '__main__':
return 1
if arguments['--env']:
environment = get_python_environment('python' + arguments['--env'])
environment = get_system_environment('python' + arguments['--env'])
else:
# Will be 3.6.
environment = get_default_environment()

View File

@@ -6,15 +6,15 @@ import pytest
import jedi
from jedi._compatibility import py_version
from jedi.api.environment import get_default_environment, find_virtualenvs, \
InvalidPythonEnvironment, find_python_environments, get_python_environment
InvalidPythonEnvironment, find_system_environments, get_system_environment
def test_sys_path():
assert get_default_environment().get_sys_path()
def test_find_python_environments():
envs = list(find_python_environments())
def test_find_system_environments():
envs = list(find_system_environments())
assert len(envs)
for env in envs:
assert env.version_info
@@ -29,7 +29,7 @@ def test_find_python_environments():
)
def test_versions(version):
try:
env = get_python_environment('python' + version)
env = get_system_environment('python' + version)
except InvalidPythonEnvironment:
if int(version.replace('.', '')) == py_version:
# At least the current version has to work