mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-16 23:43:44 -05:00
Add test helpers for virtualenv, pyvenv and conda
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user