mirror of
https://github.com/pyenv/pyenv.git
synced 2025-12-06 18:08:37 +00:00
Compare commits
3 Commits
556e3b6247
...
873990f2b3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
873990f2b3 | ||
|
|
a6ea5b3179 | ||
|
|
0f7b8fa8ee |
@ -11,7 +11,7 @@ shell="$(basename "${PYENV_SHELL:-$SHELL}")"
|
||||
|
||||
# When pyenv shell integration is enabled, delegate to pyenv-rehash,
|
||||
# then tell the shell to empty its command lookup cache.
|
||||
pyenv-rehash
|
||||
echo "command pyenv rehash"
|
||||
|
||||
case "$shell" in
|
||||
fish )
|
||||
|
||||
@ -110,13 +110,27 @@ SH
|
||||
@test "sh-rehash in bash" {
|
||||
create_executable "3.4" "python"
|
||||
PYENV_SHELL=bash run pyenv-sh-rehash
|
||||
assert_success "hash -r 2>/dev/null || true"
|
||||
assert_success "command pyenv rehash
|
||||
hash -r 2>/dev/null || true"
|
||||
}
|
||||
|
||||
@test "sh-rehash in bash (integration)" {
|
||||
create_executable "3.4" "python"
|
||||
run eval "$(pyenv-sh-rehash)"
|
||||
assert_success
|
||||
assert [ -x "${PYENV_ROOT}/shims/python" ]
|
||||
}
|
||||
|
||||
@test "sh-rehash in fish" {
|
||||
create_executable "3.4" "python"
|
||||
PYENV_SHELL=fish run pyenv-sh-rehash
|
||||
assert_success ""
|
||||
assert_success "command pyenv rehash"
|
||||
}
|
||||
|
||||
@test "sh-rehash in fish (integration)" {
|
||||
command -v fish >/dev/null || skip "-- fish not installed"
|
||||
create_executable "3.4" "python"
|
||||
run fish -Nc "eval (pyenv-sh-rehash)"
|
||||
assert_success
|
||||
assert [ -x "${PYENV_ROOT}/shims/python" ]
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user