summaryrefslogtreecommitdiff
path: root/tests/integration
diff options
context:
space:
mode:
authorBernát Gábor <bgabor8@bloomberg.net>2020-01-30 18:52:57 +0000
committerGitHub <noreply@github.com>2020-01-30 18:52:57 +0000
commit9d37eb3ded19e4d7c9a9e7730929387a33ecd437 (patch)
tree661265d3ccbd294ae3e1c05652d5feecd05be172 /tests/integration
parentd80dc4d3907bfad72918b0165009234e4f734241 (diff)
downloadvirtualenv-9d37eb3ded19e4d7c9a9e7730929387a33ecd437.tar.gz
Better handling of base executable not found #1515
Improve the base executable discovery mechanism: - print at debug level why we refuse some candidates, - when no candidates match exactly, instead of hard failing fallback to the closest match where the priority of matching attributes is python implementation, major version, minor version, architecture, patch version, release level and serial (this is to facilitate things to still work when the OS upgrade replace/upgrades the system python with a newer version than what the virtualenv host python was created with), - always resolve system_executable information during the interpreter discovery, and the discovered environment is the system interpreter instead of the venv/virtualenv (this happened before lazily the first time we accessed and caused reporting that the created virtual environment is of type of the virtualenv host python version, instead of the system pythons version - these two can differ if the OS upgraded the system python underneath and the virtualenv host was created via copy),
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/test_zipapp.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/integration/test_zipapp.py b/tests/integration/test_zipapp.py
index 25e83fd..0d64ae8 100644
--- a/tests/integration/test_zipapp.py
+++ b/tests/integration/test_zipapp.py
@@ -7,11 +7,12 @@ import sys
import pytest
import six
-from virtualenv.discovery.py_info import CURRENT
+from virtualenv.discovery.py_info import PythonInfo
from virtualenv.run import run_via_cli
from virtualenv.util.path import Path
HERE = Path(__file__).parent
+CURRENT = PythonInfo.current_system()
@pytest.fixture(scope="session")