mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-12 05:23:53 -05:00
Exit as error on activation failures
This commit is contained in:
@@ -137,13 +137,17 @@ EOS
|
||||
}
|
||||
|
||||
@test "should fail if the version is not a virtualenv" {
|
||||
stub pyenv-virtualenv-prefix "3.3.3 : false"
|
||||
stub pyenv-virtualenv-prefix "3.3.3 : echo \"not a virtualenv\" 1>&2; false"
|
||||
|
||||
run pyenv-sh-activate "3.3.3"
|
||||
|
||||
unstub pyenv-virtualenv-prefix
|
||||
|
||||
assert_failure
|
||||
assert_output <<EOS
|
||||
not a virtualenv
|
||||
false
|
||||
EOS
|
||||
}
|
||||
|
||||
@test "should fail if there are multiple versions" {
|
||||
@@ -152,6 +156,7 @@ EOS
|
||||
assert_failure
|
||||
assert_output <<EOS
|
||||
pyenv-virtualenv: cannot activate multiple versions at once: venv venv27
|
||||
false
|
||||
EOS
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user