mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-16 15:33:51 -05:00
Restore variables set by activate script of virtualenv properly (#150)
The `activate` script does't export the variables of `_OLD_VIRTUAL_*`, most the deactivation code needed to be moved to `sh-deactivate`.
This commit is contained in:
@@ -263,13 +263,15 @@ EOS
|
||||
export VIRTUAL_ENV="${PYENV_ROOT}/versions/venv"
|
||||
export PYENV_ACTIVATE_SHELL=
|
||||
|
||||
stub pyenv-sh-deactivate "echo deactivated"
|
||||
|
||||
run pyenv-sh-activate --unset
|
||||
|
||||
unstub pyenv-sh-deactivate
|
||||
|
||||
assert_success
|
||||
assert_output <<EOS
|
||||
pyenv-virtualenv: deactivate venv
|
||||
export PYENV_DEACTIVATE="${PYENV_ROOT}/versions/venv";
|
||||
unset VIRTUAL_ENV;
|
||||
deactivated
|
||||
EOS
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user