pyenv verification source
Some checks are pending
macos_build / macos_build (3.10) (push) Waiting to run
macos_build / macos_build (3.11) (push) Waiting to run
macos_build / macos_build (3.12) (push) Waiting to run
macos_build / macos_build (3.13) (push) Waiting to run
macos_build / macos_build (3.14) (push) Waiting to run
pyenv_tests / pyenv_tests (macos-14) (push) Waiting to run
pyenv_tests / pyenv_tests (macos-15) (push) Waiting to run
pyenv_tests / pyenv_tests (macos-15-intel) (push) Waiting to run
pyenv_tests / pyenv_tests (macos-26) (push) Waiting to run
pyenv_tests / pyenv_tests (ubuntu-22.04) (push) Waiting to run
pyenv_tests / pyenv_tests (ubuntu-24.04) (push) Waiting to run
ubuntu_build / ubuntu_build (3.10) (push) Waiting to run
ubuntu_build / ubuntu_build (3.11) (push) Waiting to run
ubuntu_build / ubuntu_build (3.12) (push) Waiting to run
ubuntu_build / ubuntu_build (3.13) (push) Waiting to run
ubuntu_build / ubuntu_build (3.14) (push) Waiting to run

This commit is contained in:
2026-05-22 16:45:42 +08:00
commit b622f8abd2
1500 changed files with 110179 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
#!/usr/bin/env bats
load test_helper
@test "installs python-build into PREFIX" {
cd "$BATS_TEST_TMPDIR"
PREFIX="${PWD}/usr" run "${BATS_TEST_DIRNAME}/../install.sh"
assert_success ""
cd usr
assert [ -x bin/python-build ]
assert [ -x bin/pyenv-install ]
assert [ -x bin/pyenv-uninstall ]
assert [ -e share/python-build/2.7.2 ]
assert [ -e share/python-build/pypy-2.0 ]
}
@test "build definitions don't have the executable bit" {
cd "$BATS_TEST_TMPDIR"
PREFIX="${PWD}/usr" run "${BATS_TEST_DIRNAME}/../install.sh"
assert_success ""
run $BASH -c 'ls -l usr/share/python-build | tail -2 | cut -c1-10'
assert_output <<OUT
-rw-r--r--
-rw-r--r--
OUT
}
@test "overwrites old installation" {
cd "$BATS_TEST_TMPDIR"
mkdir -p bin share/python-build
touch bin/python-build
touch share/python-build/2.7.2
PREFIX="$PWD" run "${BATS_TEST_DIRNAME}/../install.sh"
assert_success ""
assert [ -x bin/python-build ]
run grep "install_package" share/python-build/2.7.2
assert_success
}
@test "unrelated files are untouched" {
cd "$BATS_TEST_TMPDIR"
mkdir -p bin share/bananas
chmod g-w bin
touch bin/bananas
touch share/bananas/docs
PREFIX="$PWD" run "${BATS_TEST_DIRNAME}/../install.sh"
assert_success ""
assert [ -e bin/bananas ]
assert [ -e share/bananas/docs ]
run ls -ld bin
assert_equal "-" "${output:5:1}"
}