1
0
forked from VimPlug/jedi

Add JEDI_TEST_ENVIRONMENT_EXECUTABLE for AppVeyor

This commit is contained in:
micbou
2018-03-24 21:47:32 +01:00
committed by Dave Halter
parent e8b301ebf9
commit bf57fa16fc
6 changed files with 97 additions and 50 deletions

View File

@@ -87,16 +87,18 @@ def clean_jedi_cache(request):
@pytest.fixture(scope='session')
def environment(request):
python = request.config.option.env
if python is None:
python = os.environ.get('JEDI_TEST_ENVIRONMENT', 'python')
python = os.environ.get('JEDI_TEST_ENVIRONMENT_EXECUTABLE')
if python:
return get_python_environment(python)
environment = get_python_environment(python)
version_info = environment.version_info
if int(str(version_info.major) + str(version_info.minor)) == py_version:
return get_default_environment()
version = request.config.option.env
if version is None:
version = os.environ.get('JEDI_TEST_ENVIRONMENT', str(py_version))
return environment
if int(version) == py_version:
return get_default_environment()
return get_python_environment('python%s.%s' % tuple(version))
@pytest.fixture(scope='session')