mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-18 00:03:45 -05:00
fix test isolation
Make sur that PYENV_TEST_DIR is created if mktemp failed mock python3 usage by updating create_executable function fix test by adding the right PATH update path in plugin test replace for loop with while read don't use symlink for stub
This commit is contained in:
@@ -20,7 +20,7 @@ load test_helper
|
||||
mkdir -p "${PYENV_TEST_DIR}/bin"
|
||||
touch "${PYENV_TEST_DIR}/bin/python"
|
||||
chmod +x "${PYENV_TEST_DIR}/bin/python"
|
||||
PYENV_VERSION="system" run pyenv-prefix
|
||||
PATH="${PYENV_TEST_DIR}/libexec:$PATH" PYENV_VERSION="system" run pyenv-prefix
|
||||
assert_success "$PYENV_TEST_DIR"
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ load test_helper
|
||||
echo /bin/python
|
||||
OUT
|
||||
chmod +x "${BATS_TEST_DIRNAME}/libexec/pyenv-which"
|
||||
PYENV_VERSION="system" run pyenv-prefix
|
||||
PATH="${PYENV_TEST_DIR}/libexec:$PATH" PYENV_VERSION="system" run pyenv-prefix
|
||||
assert_success "/"
|
||||
rm -f "${BATS_TEST_DIRNAME}/libexec/pyenv-which"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user