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:
@@ -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'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user