1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-18 00:03:45 -05:00

Improve pyenv version, if there is one missing

Display the other available ones still.

Fixes https://github.com/yyuu/pyenv/issues/291
This commit is contained in:
Daniel Hahler
2014-12-11 18:47:09 +01:00
parent d320d74a07
commit 7f88eabd0b
3 changed files with 47 additions and 1 deletions

View File

@@ -36,3 +36,24 @@ setup() {
run pyenv-version
assert_success "3.3.3 (set by ${PYENV_ROOT}/version)"
}
@test "set by PYENV_VERSION, one missing" {
create_version "3.3.3"
PYENV_VERSION=3.3.3:1.2 run pyenv-version
assert_success
assert_output <<OUT
pyenv: version \`1.2' is not installed
3.3.3 (set by PYENV_VERSION environment variable)
OUT
}
@test "set by PYENV_VERSION, two missing" {
create_version "3.3.3"
PYENV_VERSION=3.4.2:3.3.3:1.2 run pyenv-version
assert_success
assert_output <<OUT
pyenv: version \`3.4.2' is not installed
pyenv: version \`1.2' is not installed
3.3.3 (set by PYENV_VERSION environment variable)
OUT
}