Add test helpers for virtualenv, pyvenv and conda

This commit is contained in:
Yamashita, Yuu
2015-11-27 13:30:52 +00:00
parent 6a2b77ed5b
commit 48b491f343
10 changed files with 115 additions and 86 deletions

View File

@@ -8,12 +8,10 @@ setup() {
}
@test "display virtualenv version" {
setup_virtualenv "2.7.7"
stub pyenv-prefix "echo '${PYENV_ROOT}/versions/2.7.7'"
stub pyenv-exec "virtualenv --version : echo \"1.11\""
create_executable "2.7.7" "virtualenv"
remove_executable "2.7.7" "pyvenv"
run pyenv-virtualenv --version
assert_success
@@ -21,19 +19,19 @@ setup() {
unstub pyenv-prefix
unstub pyenv-exec
teardown_virtualenv "2.7.7"
}
@test "display pyvenv version" {
setup_pyvenv "3.4.1"
stub pyenv-prefix "echo '${PYENV_ROOT}/versions/3.4.1'"
stub pyenv-which "pyvenv : echo \"${PYENV_ROOT}/versions/3.4.1/bin/pyvenv\""
remove_executable "3.4.1" "virtualenv"
create_executable "3.4.1" "pyvenv"
run pyenv-virtualenv --version
assert_success
assert_output "pyenv-virtualenv ${PYENV_VIRTUALENV_VERSION} (pyvenv 3.4.1)"
unstub pyenv-prefix
teardown_pyvenv "3.4.1"
}