1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-11 04:53:47 -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:
rockandska
2025-09-08 16:47:50 +02:00
committed by Tester
parent 8990110dcf
commit 92a28e531b
29 changed files with 234 additions and 233 deletions

View File

@@ -4,7 +4,7 @@ load test_helper
@test "not enough arguments for python-build" {
# use empty inline definition so nothing gets built anyway
local definition="${TMP}/build-definition"
local definition="${BATS_TEST_TMPDIR}/build-definition"
echo '' > "$definition"
run python-build "$definition"
@@ -14,10 +14,10 @@ load test_helper
@test "extra arguments for python-build" {
# use empty inline definition so nothing gets built anyway
local definition="${TMP}/build-definition"
local definition="${BATS_TEST_TMPDIR}/build-definition"
echo '' > "$definition"
run python-build "$definition" "${TMP}/install" ""
run python-build "$definition" "${BATS_TEST_TMPDIR}/install" ""
assert_failure
assert_output_contains 'Usage: python-build'
}