mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-12 05:23:47 -05:00
Auto-resolve prefixes to the latest version (#2487)
This commit is contained in:
@@ -10,6 +10,7 @@ setup() {
|
||||
|
||||
stub_python_build() {
|
||||
stub python-build "--lib : $BATS_TEST_DIRNAME/../bin/python-build --lib" "$@"
|
||||
stub pyenv-latest " : false"
|
||||
}
|
||||
|
||||
@test "install proper" {
|
||||
@@ -23,6 +24,19 @@ stub_python_build() {
|
||||
unstub pyenv-rehash
|
||||
}
|
||||
|
||||
@test "install resolves a prefix" {
|
||||
stub_python_build 'echo python-build "$@"'
|
||||
stub pyenv-latest '-q -k 3.4 : echo 3.4.2'
|
||||
pyenv-latest || true # pass through the stub entry added by stub_python_build
|
||||
|
||||
run pyenv-install 3.4
|
||||
assert_success "python-build 3.4.2 ${PYENV_ROOT}/versions/3.4.2"
|
||||
|
||||
unstub python-build
|
||||
unstub pyenv-hooks
|
||||
unstub pyenv-rehash
|
||||
}
|
||||
|
||||
@test "install pyenv local version by default" {
|
||||
stub_python_build 'echo python-build "$1"'
|
||||
stub pyenv-local 'echo 3.4.2'
|
||||
|
||||
Reference in New Issue
Block a user