Use python -m venv instead on pyvenv in tests

This commit is contained in:
Yamashita, Yuu
2016-07-16 06:31:30 +00:00
parent 7dc9f78589
commit 187156d600
7 changed files with 26 additions and 15 deletions

View File

@@ -9,6 +9,7 @@ setup() {
@test "display virtualenv version" {
setup_virtualenv "2.7.7"
stub pyenv-prefix "echo '${PYENV_ROOT}/versions/2.7.7'"
stub pyenv-exec "python -m venv --help : false"
stub pyenv-exec "virtualenv --version : echo \"1.11\""
run pyenv-virtualenv --version
@@ -24,12 +25,13 @@ setup() {
@test "display pyvenv version" {
setup_pyvenv "3.4.1"
stub pyenv-prefix "echo '${PYENV_ROOT}/versions/3.4.1'"
stub pyenv-exec "python -m venv --help : true"
stub pyenv-which "pyvenv : echo \"${PYENV_ROOT}/versions/3.4.1/bin/pyvenv\""
run pyenv-virtualenv --version
assert_success
[[ "$output" == "pyenv-virtualenv 20"*" (pyvenv 3.4.1)" ]]
[[ "$output" == "pyenv-virtualenv 20"*" (python -m venv)" ]]
unstub pyenv-prefix
teardown_pyvenv "3.4.1"