1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-10 04:23:47 -05:00

Revert version auto-resolution in python-build

It was moved to `pyenv-install`
This commit is contained in:
Ivan Pozdeev
2022-10-30 04:12:42 +03:00
parent a12f947cc3
commit 75022d5d7c
2 changed files with 5 additions and 37 deletions

View File

@@ -60,30 +60,11 @@ NUM_DEFINITIONS="$(find "$BATS_TEST_DIRNAME"/../share/python-build -maxdepth 1 -
}
@test "installing nonexistent definition" {
stub pyenv-latest false
run python-build "nonexistent" "${TMP}/install"
assert [ "$status" -eq 2 ]
assert_output "python-build: definition not found: nonexistent"
}
@test "resolves prefixes via pyenv-latest" {
stub pyenv-latest "echo 2.7.8"
export PYTHON_BUILD_ROOT="$TMP"
mkdir -p "${PYTHON_BUILD_ROOT}/share/python-build"
echo 'echo 2.7.8' > "${PYTHON_BUILD_ROOT}/share/python-build/2.7.8"
run python-build "2.7" "${TMP}/install"
assert_success "2.7.8"
}
@test "doesn't resolve prefixes if pyenv-latest is unavailable" {
export PATH="$(path_without pyenv-latest)"
export PYTHON_BUILD_ROOT="$TMP"
mkdir -p "${PYTHON_BUILD_ROOT}/share/python-build"
echo 'echo 2.7.8' > "${PYTHON_BUILD_ROOT}/share/python-build/2.7.8"
run python-build "2.7" "${TMP}/install"
assert_failure "python-build: definition not found: 2.7"
}
@test "sorting Python versions" {
export PYTHON_BUILD_ROOT="$TMP"
mkdir -p "${PYTHON_BUILD_ROOT}/share/python-build"