Treat all versions with activate script as a virtual environment

This commit is contained in:
Yamashita, Yuu
2015-11-04 12:45:40 +00:00
parent 7931f6c766
commit 2ae921c253
4 changed files with 50 additions and 80 deletions

View File

@@ -14,28 +14,28 @@ setup() {
PYENV_VERSION="anaconda-2.3.0" run pyenv-virtualenv-prefix
unstub pyenv-version-name
unstub pyenv-prefix
assert_success
assert_output <<OUT
${PYENV_ROOT}/versions/anaconda-2.3.0
OUT
unstub pyenv-version-name
unstub pyenv-prefix
}
@test "display conda env" {
create_conda "anaconda-2.3.0" "foo"
stub pyenv-version-name "echo anaconda-2.3.0/envs/foo"
stub pyenv-prefix "anaconda-2.3.0 : echo \"${PYENV_ROOT}/versions/anaconda-2.3.0\""
stub pyenv-prefix "anaconda-2.3.0/envs/foo : echo \"${PYENV_ROOT}/versions/anaconda-2.3.0/envs/foo\""
PYENV_VERSION="anaconda-2.3.0/envs/foo" run pyenv-virtualenv-prefix
unstub pyenv-version-name
unstub pyenv-prefix
assert_success
assert_output <<OUT
${PYENV_ROOT}/versions/anaconda-2.3.0
${PYENV_ROOT}/versions/anaconda-2.3.0/envs/foo
OUT
unstub pyenv-version-name
unstub pyenv-prefix
}