mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 23:04:48 +08:00
Now it's actually possible to specify a pytest environment for the same Python version
This commit is contained in:
@@ -6,8 +6,7 @@ from functools import partial
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
import jedi
|
import jedi
|
||||||
from jedi.api.environment import get_default_environment, \
|
from jedi.api.environment import get_system_environment, InterpreterEnvironment
|
||||||
get_system_environment, InterpreterEnvironment
|
|
||||||
from jedi._compatibility import py_version
|
from jedi._compatibility import py_version
|
||||||
|
|
||||||
collect_ignore = [
|
collect_ignore = [
|
||||||
@@ -98,9 +97,6 @@ def environment(request):
|
|||||||
if version is None:
|
if version is None:
|
||||||
version = os.environ.get('JEDI_TEST_ENVIRONMENT', str(py_version))
|
version = os.environ.get('JEDI_TEST_ENVIRONMENT', str(py_version))
|
||||||
|
|
||||||
if int(version) == py_version:
|
|
||||||
return get_default_environment()
|
|
||||||
|
|
||||||
return get_system_environment(version[0] + '.' + version[1:])
|
return get_system_environment(version[0] + '.' + version[1:])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ class CompiledSubprocess(object):
|
|||||||
@property
|
@property
|
||||||
@memoize_method
|
@memoize_method
|
||||||
def _process(self):
|
def _process(self):
|
||||||
|
debug.dbg('Start environment subprocess %s', self._executable)
|
||||||
parso_path = sys.modules['parso'].__file__
|
parso_path = sys.modules['parso'].__file__
|
||||||
args = (
|
args = (
|
||||||
self._executable,
|
self._executable,
|
||||||
|
|||||||
Reference in New Issue
Block a user