1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-08 11:33:49 -05:00
Files
pyenv/plugins/python-build/test/arguments.bats
rockandska 92a28e531b 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
2025-09-15 19:48:34 +02:00

24 lines
654 B
Bash

#!/usr/bin/env bats
load test_helper
@test "not enough arguments for python-build" {
# use empty inline definition so nothing gets built anyway
local definition="${BATS_TEST_TMPDIR}/build-definition"
echo '' > "$definition"
run python-build "$definition"
assert_failure
assert_output_contains 'Usage: python-build'
}
@test "extra arguments for python-build" {
# use empty inline definition so nothing gets built anyway
local definition="${BATS_TEST_TMPDIR}/build-definition"
echo '' > "$definition"
run python-build "$definition" "${BATS_TEST_TMPDIR}/install" ""
assert_failure
assert_output_contains 'Usage: python-build'
}