#!/usr/bin/env bats load test_helper setup() { export HOME="${TMP}" export PYENV_ROOT="${TMP}/pyenv" unset PYENV_VERSION unset PYENV_ACTIVATE_SHELL unset VIRTUAL_ENV unset CONDA_DEFAULT_ENV unset PYTHONHOME unset _OLD_VIRTUAL_PYTHONHOME unset PYENV_VIRTUALENV_VERBOSE_ACTIVATE unset PYENV_VIRTUALENV_DISABLE_PROMPT unset PYENV_VIRTUAL_ENV_DISABLE_PROMPT unset VIRTUAL_ENV_DISABLE_PROMPT unset PYENV_VIRTUALENV_PROMPT unset _OLD_VIRTUAL_PS1 stub pyenv-hooks "activate : echo" } @test "activate virtualenv from current version" { export PYENV_VIRTUALENV_INIT=1 stub pyenv-version-name "echo venv" stub pyenv-virtualenv-prefix "venv : echo \"${PYENV_ROOT}/versions/venv\"" stub pyenv-prefix "venv : echo \"${PYENV_ROOT}/versions/venv\"" stub pyenv-sh-deactivate "--force --quiet : echo deactivated" PYENV_SHELL="bash" PYENV_VERSION="venv" run pyenv-sh-activate assert_success assert_output <