mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-11 04:53:53 -05:00
Fix failing to detect -m venv when "python" is not provided by the distro (#479)
This commit is contained in:
@@ -33,8 +33,6 @@ teardown() {
|
||||
create_executable "2.7.8" "python2.7"
|
||||
remove_executable "2.7.9" "python2.7"
|
||||
|
||||
stub pyenv-exec "python2.7 -m venv --help : false"
|
||||
stub pyenv-exec "python2 -m venv --help : false"
|
||||
stub pyenv-exec "python -m venv --help : false"
|
||||
stub pyenv-exec "virtualenv --verbose * : echo PYENV_VERSION=\${PYENV_VERSION} \"\$@\""
|
||||
stub pyenv-exec "python -s -m ensurepip : true"
|
||||
@@ -42,13 +40,13 @@ teardown() {
|
||||
|
||||
run pyenv-virtualenv --verbose --python=python2.7 venv
|
||||
|
||||
unstub pyenv-exec
|
||||
assert_output <<OUT
|
||||
PYENV_VERSION=2.7.8 virtualenv --verbose --python=${PYENV_ROOT}/versions/2.7.8/bin/python2.7 ${PYENV_ROOT}/versions/2.7.8/envs/venv
|
||||
OUT
|
||||
assert_success
|
||||
|
||||
unstub pyenv-which
|
||||
unstub pyenv-exec
|
||||
|
||||
remove_executable "2.7.7" "python2.7"
|
||||
remove_executable "2.7.8" "python2.7"
|
||||
@@ -60,8 +58,6 @@ OUT
|
||||
remove_executable "2.7.8" "python2.7"
|
||||
create_executable "2.7.9" "python2.7"
|
||||
|
||||
stub pyenv-exec "python2.7 -m venv --help : false"
|
||||
stub pyenv-exec "python2 -m venv --help : false"
|
||||
stub pyenv-exec "python -m venv --help : false"
|
||||
stub pyenv-exec "virtualenv --verbose * : echo PYENV_VERSION=\${PYENV_VERSION} \"\$@\""
|
||||
stub pyenv-exec "python -s -m ensurepip : true"
|
||||
@@ -118,4 +114,4 @@ pyenv-virtualenv: \`99.99.99' is not installed in pyenv.
|
||||
It does not look like a valid Python version. See \`pyenv install --list' for available versions.
|
||||
OUT
|
||||
assert_failure
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user