mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-14 20:39:55 -05:00
Add basic test for rehash wait
This commit is contained in:
parent
7973e59473
commit
1ec57a0c68
1 changed files with 9 additions and 0 deletions
|
@ -32,6 +32,15 @@ create_executable() {
|
||||||
assert_failure "pyenv: cannot rehash: ${PYENV_ROOT}/shims/.pyenv-shim exists"
|
assert_failure "pyenv: cannot rehash: ${PYENV_ROOT}/shims/.pyenv-shim exists"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "wait until lock acquisition" {
|
||||||
|
export PYENV_REHASH_TIMEOUT=5
|
||||||
|
mkdir -p "${PYENV_ROOT}/shims"
|
||||||
|
touch "${PYENV_ROOT}/shims/.pyenv-shim"
|
||||||
|
bash -c "sleep 1 && rm -f ${PYENV_ROOT}/shims/.pyenv-shim" &
|
||||||
|
run pyenv-rehash
|
||||||
|
assert_success
|
||||||
|
}
|
||||||
|
|
||||||
@test "creates shims" {
|
@test "creates shims" {
|
||||||
create_executable "2.7" "python"
|
create_executable "2.7" "python"
|
||||||
create_executable "2.7" "fab"
|
create_executable "2.7" "fab"
|
||||||
|
|
Loading…
Reference in a new issue