mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-12 13: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:
@@ -6,9 +6,7 @@ if [ "$FIXTURE_ROOT" != "$BATS_TEST_DIRNAME/fixtures" ]; then
|
||||
export FIXTURE_ROOT="$BATS_TEST_DIRNAME/fixtures"
|
||||
export INSTALL_ROOT="$TMP/install"
|
||||
PATH="/usr/bin:/bin:/usr/sbin:/sbin"
|
||||
if [ "FreeBSD" = "$(uname -s)" ]; then
|
||||
PATH="/usr/local/bin:$PATH"
|
||||
fi
|
||||
PATH="/usr/local/bin:$PATH"
|
||||
PATH="$BATS_TEST_DIRNAME/../bin:$PATH"
|
||||
PATH="$TMP/bin:$PATH"
|
||||
export PATH
|
||||
@@ -29,7 +27,7 @@ stub() {
|
||||
export "${prefix}_STUB_END"=
|
||||
|
||||
mkdir -p "${TMP}/bin"
|
||||
ln -sf "${BATS_TEST_DIRNAME}/stubs/stub" "${TMP}/bin/${program}"
|
||||
cp "${BATS_TEST_DIRNAME}/stubs/stub" "${TMP}/bin/${program}"
|
||||
|
||||
touch "${TMP}/${program}-stub-plan"
|
||||
for arg in "$@"; do printf "%s\n" "$arg" >> "${TMP}/${program}-stub-plan"; done
|
||||
|
||||
Reference in New Issue
Block a user