Browse Source

updated tests

pull/454/head
Marcin 1 year ago
parent
commit
6e73570329
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      test/python.bats

+ 13
- 0
test/python.bats View File

@ -14,6 +14,7 @@ setup() {
stub pyenv-rehash " : true"
stub pyenv-version-name "echo \${PYENV_VERSION}"
stub curl true
stub python-build "echo python2.7"
}
teardown() {
@ -22,6 +23,7 @@ teardown() {
unstub pyenv-prefix
unstub pyenv-hooks
unstub pyenv-rehash
unstub python-build
teardown_version "2.7.8"
rm -fr "$TMP"/*
}
@ -96,6 +98,7 @@ OUT
assert_output <<OUT
pyenv-virtualenv: \`python2.7' is not installed in pyenv.
Run \`pyenv install python2.7' to install it.
OUT
assert_failure
@ -106,3 +109,13 @@ OUT
remove_executable "2.7.8" "python2.7"
remove_executable "2.7.9" "python2.7"
}
@test "invalid python name" {
run pyenv-virtualenv --verbose --python=99.99.99 venv
assert_output <<OUT
pyenv-virtualenv: \`99.99.99' is not installed in pyenv.
It does not look like a valid Python version. See \`pyenv install --list' for available versions.
OUT
assert_failure
}

Loading…
Cancel
Save