Add --quiet option to activate and deactivate

This commit is contained in:
Yamashita Yuu
2014-07-04 20:47:10 +09:00
parent 5b3b909089
commit f0c400b669
4 changed files with 132 additions and 24 deletions

View File

@@ -137,7 +137,7 @@ EOS
}
@test "should fail if the version is not a virtualenv" {
stub pyenv-virtualenv-prefix "3.3.3 : echo \"not a virtualenv\" 1>&2; false"
stub pyenv-virtualenv-prefix "3.3.3 : false"
run pyenv-sh-activate "3.3.3"
@@ -145,7 +145,20 @@ EOS
assert_failure
assert_output <<EOS
not a virtualenv
pyenv-virtualenv: version \`3.3.3' is not a virtualenv
false
EOS
}
@test "should fail if the version is not a virtualenv (quiet)" {
stub pyenv-virtualenv-prefix "3.3.3 : false"
run pyenv-sh-activate --quiet "3.3.3"
unstub pyenv-virtualenv-prefix
assert_failure
assert_output <<EOS
false
EOS
}
@@ -160,6 +173,15 @@ false
EOS
}
@test "should fail if there are multiple versions (quiet)" {
run pyenv-sh-activate --quiet "venv" "venv27"
assert_failure
assert_output <<EOS
false
EOS
}
@test "should fail if activate is invoked as a command" {
run pyenv-activate