mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Fix broken test for pyenv-version-name
This commit is contained in:
parent
be3fc6d8cb
commit
fd893ea3b0
1 changed files with 22 additions and 22 deletions
|
@ -47,25 +47,25 @@ SH
|
||||||
create_version "2.7.11"
|
create_version "2.7.11"
|
||||||
create_version "3.5.1"
|
create_version "3.5.1"
|
||||||
|
|
||||||
cat > ".python-version" <<<"2.7.6"
|
cat > ".python-version" <<<"2.7.11"
|
||||||
run pyenv-version-name
|
run pyenv-version-name
|
||||||
assert_success "2.7.6"
|
assert_success "2.7.11"
|
||||||
|
|
||||||
PYENV_VERSION=3.3.3 run pyenv-version-name
|
PYENV_VERSION=3.5.1 run pyenv-version-name
|
||||||
assert_success "3.3.3"
|
assert_success "3.5.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "local file has precedence over global" {
|
@test "local file has precedence over global" {
|
||||||
create_version "2.7.6"
|
create_version "2.7.11"
|
||||||
create_version "3.3.3"
|
create_version "3.5.1"
|
||||||
|
|
||||||
cat > "${PYENV_ROOT}/version" <<<"2.7.6"
|
cat > "${PYENV_ROOT}/version" <<<"2.7.11"
|
||||||
run pyenv-version-name
|
run pyenv-version-name
|
||||||
assert_success "2.7.6"
|
assert_success "2.7.11"
|
||||||
|
|
||||||
cat > ".python-version" <<<"3.3.3"
|
cat > ".python-version" <<<"3.5.1"
|
||||||
run pyenv-version-name
|
run pyenv-version-name
|
||||||
assert_success "3.3.3"
|
assert_success "3.5.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "missing version" {
|
@test "missing version" {
|
||||||
|
@ -74,22 +74,22 @@ SH
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "one missing version (second missing)" {
|
@test "one missing version (second missing)" {
|
||||||
create_version "3.4.2"
|
create_version "3.5.1"
|
||||||
PYENV_VERSION="3.4.2:1.2" run pyenv-version-name
|
PYENV_VERSION="3.5.1:1.2" run pyenv-version-name
|
||||||
assert_failure
|
assert_failure
|
||||||
assert_output <<OUT
|
assert_output <<OUT
|
||||||
pyenv: version \`1.2' is not installed (set by PYENV_VERSION environment variable)
|
pyenv: version \`1.2' is not installed (set by PYENV_VERSION environment variable)
|
||||||
3.4.2
|
3.5.1
|
||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "one missing version (first missing)" {
|
@test "one missing version (first missing)" {
|
||||||
create_version "3.4.2"
|
create_version "3.5.1"
|
||||||
PYENV_VERSION="1.2:3.4.2" run pyenv-version-name
|
PYENV_VERSION="1.2:3.5.1" run pyenv-version-name
|
||||||
assert_failure
|
assert_failure
|
||||||
assert_output <<OUT
|
assert_output <<OUT
|
||||||
pyenv: version \`1.2' is not installed (set by PYENV_VERSION environment variable)
|
pyenv: version \`1.2' is not installed (set by PYENV_VERSION environment variable)
|
||||||
3.4.2
|
3.5.1
|
||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,18 +98,18 @@ pyenv-version-name-without-stderr() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "one missing version (without stderr)" {
|
@test "one missing version (without stderr)" {
|
||||||
create_version "3.4.2"
|
create_version "3.5.1"
|
||||||
PYENV_VERSION="1.2:3.4.2" run pyenv-version-name-without-stderr
|
PYENV_VERSION="1.2:3.5.1" run pyenv-version-name-without-stderr
|
||||||
assert_failure
|
assert_failure
|
||||||
assert_output <<OUT
|
assert_output <<OUT
|
||||||
3.4.2
|
3.5.1
|
||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "version with prefix in name" {
|
@test "version with prefix in name" {
|
||||||
create_version "2.7.6"
|
create_version "2.7.11"
|
||||||
cat > ".python-version" <<<"python-2.7.6"
|
cat > ".python-version" <<<"python-2.7.11"
|
||||||
run pyenv-version-name
|
run pyenv-version-name
|
||||||
assert_success
|
assert_success
|
||||||
assert_output "2.7.6"
|
assert_output "2.7.11"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue