1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-12 21:33:54 -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

@@ -3,7 +3,7 @@
load test_helper
@test "installs python-build into PREFIX" {
cd "$TMP"
cd "$BATS_TEST_TMPDIR"
PREFIX="${PWD}/usr" run "${BATS_TEST_DIRNAME}/../install.sh"
assert_success ""
@@ -18,7 +18,7 @@ load test_helper
}
@test "build definitions don't have the executable bit" {
cd "$TMP"
cd "$BATS_TEST_TMPDIR"
PREFIX="${PWD}/usr" run "${BATS_TEST_DIRNAME}/../install.sh"
assert_success ""
@@ -30,7 +30,7 @@ OUT
}
@test "overwrites old installation" {
cd "$TMP"
cd "$BATS_TEST_TMPDIR"
mkdir -p bin share/python-build
touch bin/python-build
touch share/python-build/2.7.2
@@ -44,7 +44,7 @@ OUT
}
@test "unrelated files are untouched" {
cd "$TMP"
cd "$BATS_TEST_TMPDIR"
mkdir -p bin share/bananas
chmod g-w bin
touch bin/bananas