mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-16 15:23:53 -05:00
Add test for /bin/python case
This commit is contained in:
@@ -24,6 +24,15 @@ load test_helper
|
||||
assert_success "$PYENV_TEST_DIR"
|
||||
}
|
||||
|
||||
@test "prefix for system in /" {
|
||||
mkdir -p "${PYENV_TEST_DIR}/bin"
|
||||
touch "${PYENV_TEST_DIR}/bin/pyenv-which"
|
||||
echo "echo /bin/python" >"${PYENV_TEST_DIR}/bin/pyenv-which"
|
||||
chmod +x "${PYENV_TEST_DIR}/bin/pyenv-which"
|
||||
PYENV_VERSION="system" run pyenv-prefix
|
||||
assert_success "/"
|
||||
}
|
||||
|
||||
@test "prefix for invalid system" {
|
||||
PATH="$(path_without python)" run pyenv-prefix system
|
||||
assert_failure "pyenv: system version not found in PATH"
|
||||
|
||||
Reference in New Issue
Block a user