Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

35 lignes
953 B

il y a 10 ans
il y a 10 ans
il y a 10 ans
il y a 10 ans
il y a 10 ans
  1. #!/usr/bin/env bats
  2. load test_helper
  3. setup() {
  4. export PYENV_ROOT="${TMP}/pyenv"
  5. export HOOK_PATH="${TMP}/i has hooks"
  6. mkdir -p "$HOOK_PATH"
  7. }
  8. @test "pyenv-virtualenv hooks" {
  9. cat > "${HOOK_PATH}/virtualenv.bash" <<OUT
  10. before_virtualenv 'echo before: \$VIRTUALENV_PATH'
  11. after_virtualenv 'echo after: \$STATUS'
  12. OUT
  13. stub pyenv-prefix "echo '${PYENV_ROOT}/versions/3.2.1'"
  14. stub pyenv-prefix "echo '${PYENV_ROOT}/versions/3.2.1'"
  15. stub pyenv-prefix "echo '${PYENV_ROOT}/versions/3.2.1'"
  16. stub pyenv-hooks "virtualenv : echo '$HOOK_PATH'/virtualenv.bash"
  17. stub pyenv-exec "echo PYENV_VERSION=3.2.1 \"\$@\""
  18. stub pyenv-rehash "echo rehashed"
  19. create_executable "3.2.1" "virtualenv"
  20. remove_executable "3.2.1" "pyvenv"
  21. run pyenv-virtualenv "3.2.1" venv
  22. assert_success
  23. assert_output <<-OUT
  24. before: ${PYENV_ROOT}/versions/3.2.1/envs/venv
  25. PYENV_VERSION=3.2.1 virtualenv ${PYENV_ROOT}/versions/3.2.1/envs/venv
  26. after: 0
  27. rehashed
  28. OUT
  29. }