mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-10 12:33:48 -05:00
use BATS_FILE_TMPDIR in test/plugin test
use global setup with bats with possibility to add specific test file _setup use readlink in helper if realpath is not working as expected
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
load test_helper
|
||||
|
||||
setup() {
|
||||
export PYENV_ROOT="${TMP}/pyenv"
|
||||
export HOOK_PATH="${TMP}/i has hooks"
|
||||
_setup() {
|
||||
export PYENV_ROOT="${BATS_TEST_TMPDIR}/pyenv"
|
||||
export HOOK_PATH="${BATS_TEST_TMPDIR}/i has hooks"
|
||||
mkdir -p "$HOOK_PATH"
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ OUT
|
||||
stub pyenv-hooks "install : echo '$HOOK_PATH'/install.bash"
|
||||
stub pyenv-rehash "echo rehashed"
|
||||
|
||||
definition="${TMP}/3.6.2"
|
||||
definition="${BATS_TEST_TMPDIR}/3.6.2"
|
||||
stub pyenv-latest "echo $definition"
|
||||
|
||||
cat > "$definition" <<<"echo python-build"
|
||||
|
||||
Reference in New Issue
Block a user