From 25bf4a61553e2be6cc7e8fc0d796e2bf889bcb94 Mon Sep 17 00:00:00 2001 From: "Yamashita, Yuu" Date: Thu, 12 Nov 2015 00:27:02 +0000 Subject: [PATCH] Unset environment variables to pass tests while activated --- test/activate.bats | 7 +++++++ test/conda-activate.bats | 9 +++++++++ test/conda-deactivate.bats | 11 +++++++++++ test/deactivate.bats | 11 +++++++++++ 4 files changed, 38 insertions(+) diff --git a/test/activate.bats b/test/activate.bats index cbda492..2113d0b 100644 --- a/test/activate.bats +++ b/test/activate.bats @@ -5,10 +5,17 @@ load test_helper setup() { export HOME="${TMP}" export PYENV_ROOT="${TMP}/pyenv" + unset PYENV_VERSION + unset PYENV_ACTIVATE_SHELL + unset PYENV_DEACTIVATE + unset VIRTUAL_ENV + unset CONDA_DEFAULT_ENV unset PYTHONHOME + unset _OLD_VIRTUAL_PYTHONHOME unset PYENV_VIRTUALENV_DISABLE_PROMPT unset PYENV_VIRTUAL_ENV_DISABLE_PROMPT unset VIRTUAL_ENV_DISABLE_PROMPT + unset _OLD_VIRTUAL_PS1 } @test "activate virtualenv from current version" { diff --git a/test/conda-activate.bats b/test/conda-activate.bats index 56e6f55..8a4da15 100644 --- a/test/conda-activate.bats +++ b/test/conda-activate.bats @@ -5,7 +5,16 @@ load test_helper setup() { export HOME="${TMP}" export PYENV_ROOT="${TMP}/pyenv" + unset PYENV_VERSION + unset PYENV_ACTIVATE_SHELL + unset PYENV_DEACTIVATE + unset VIRTUAL_ENV + unset CONDA_DEFAULT_ENV + unset PYTHONHOME unset _OLD_VIRTUAL_PYTHONHOME + unset PYENV_VIRTUALENV_DISABLE_PROMPT + unset PYENV_VIRTUAL_ENV_DISABLE_PROMPT + unset VIRTUAL_ENV_DISABLE_PROMPT unset _OLD_VIRTUAL_PS1 } diff --git a/test/conda-deactivate.bats b/test/conda-deactivate.bats index e592119..1b8c9e0 100644 --- a/test/conda-deactivate.bats +++ b/test/conda-deactivate.bats @@ -4,6 +4,17 @@ load test_helper setup() { export PYENV_ROOT="${TMP}/pyenv" + unset PYENV_VERSION + unset PYENV_ACTIVATE_SHELL + unset PYENV_DEACTIVATE + unset VIRTUAL_ENV + unset CONDA_DEFAULT_ENV + unset PYTHONHOME + unset _OLD_VIRTUAL_PYTHONHOME + unset PYENV_VIRTUALENV_DISABLE_PROMPT + unset PYENV_VIRTUAL_ENV_DISABLE_PROMPT + unset VIRTUAL_ENV_DISABLE_PROMPT + unset _OLD_VIRTUAL_PS1 } @test "deactivate conda root" { diff --git a/test/deactivate.bats b/test/deactivate.bats index 4357748..d2be300 100644 --- a/test/deactivate.bats +++ b/test/deactivate.bats @@ -4,6 +4,17 @@ load test_helper setup() { export PYENV_ROOT="${TMP}/pyenv" + unset PYENV_VERSION + unset PYENV_ACTIVATE_SHELL + unset PYENV_DEACTIVATE + unset VIRTUAL_ENV + unset CONDA_DEFAULT_ENV + unset PYTHONHOME + unset _OLD_VIRTUAL_PYTHONHOME + unset PYENV_VIRTUALENV_DISABLE_PROMPT + unset PYENV_VIRTUAL_ENV_DISABLE_PROMPT + unset VIRTUAL_ENV_DISABLE_PROMPT + unset _OLD_VIRTUAL_PS1 } @test "deactivate virtualenv" {