mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-16 23:33: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:
@@ -5,6 +5,7 @@ unset PYENV_DIR
|
||||
if [ -z "$PYENV_TEST_DIR" ]; then
|
||||
PYENV_TEST_DIR="${BATS_TMPDIR}/pyenv"
|
||||
export PYENV_TEST_DIR="$(mktemp -d "${PYENV_TEST_DIR}.XXX" 2>/dev/null || echo "$PYENV_TEST_DIR")"
|
||||
mkdir -p "${PYENV_TEST_DIR}"
|
||||
|
||||
if enable -f "${BATS_TEST_DIRNAME}"/../libexec/pyenv-realpath.dylib realpath 2>/dev/null; then
|
||||
export PYENV_TEST_DIR="$(realpath "$PYENV_TEST_DIR")"
|
||||
|
||||
Reference in New Issue
Block a user