mirror of
https://github.com/pyenv/pyenv.git
synced 2025-03-24 12:12:28 +00:00
Add test for custom GET_PIP_URL
per versions
This commit is contained in:
parent
90dfb261e2
commit
a1d39c1e25
1 changed files with 53 additions and 0 deletions
|
@ -92,6 +92,19 @@ resolve_link() {
|
|||
$(type -p greadlink readlink | head -1) "$1"
|
||||
}
|
||||
|
||||
run_inline_definition_with_name() {
|
||||
local definition_name="build-definition"
|
||||
case "$1" in
|
||||
"--name="* )
|
||||
local definition_name="${1#--name=}"
|
||||
shift 1
|
||||
;;
|
||||
esac
|
||||
local definition="${TMP}/${definition_name}"
|
||||
cat > "$definition"
|
||||
run python-build "$definition" "${1:-$INSTALL_ROOT}"
|
||||
}
|
||||
|
||||
@test "apply built-in python patch before building" {
|
||||
cached_tarball "Python-3.6.2"
|
||||
|
||||
|
@ -326,3 +339,43 @@ OUT
|
|||
assert_success
|
||||
assert_output "10.4"
|
||||
}
|
||||
|
||||
@test "use the default EZ_SETUP_URL by default" {
|
||||
run_inline_definition <<OUT
|
||||
echo "\${EZ_SETUP_URL}"
|
||||
OUT
|
||||
assert_output "https://bootstrap.pypa.io/ez_setup.py"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "use the default GET_PIP_URL by default" {
|
||||
run_inline_definition <<OUT
|
||||
echo "\${GET_PIP_URL}"
|
||||
OUT
|
||||
assert_output "https://bootstrap.pypa.io/get-pip.py"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "use the custom GET_PIP_URL for 2.6 versions" {
|
||||
run_inline_definition_with_name --name=2.6 <<OUT
|
||||
echo "\${GET_PIP_URL}"
|
||||
OUT
|
||||
assert_output "https://bootstrap.pypa.io/2.6/get-pip.py"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "use the custom GET_PIP_URL for 3.2 versions" {
|
||||
run_inline_definition_with_name --name=3.2 <<OUT
|
||||
echo "\${GET_PIP_URL}"
|
||||
OUT
|
||||
assert_output "https://bootstrap.pypa.io/3.2/get-pip.py"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "use the custom GET_PIP_URL for 3.3 versions" {
|
||||
run_inline_definition_with_name --name=3.3 <<OUT
|
||||
echo "\${GET_PIP_URL}"
|
||||
OUT
|
||||
assert_output "https://bootstrap.pypa.io/3.3/get-pip.py"
|
||||
assert_success
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue