From 7430f0e74610ec4ff58beed9ebe688f58303f075 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 14 Sep 2023 14:45:48 +0200 Subject: [PATCH] Add more verbose in run-tests scripts about python --- tests/run-tests.ps1 | 6 ++++++ tests/run-tests.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/tests/run-tests.ps1 b/tests/run-tests.ps1 index 00d9a63056..97f3900867 100644 --- a/tests/run-tests.ps1 +++ b/tests/run-tests.ps1 @@ -143,6 +143,8 @@ If ($null -eq $Env:QUARTO_TESTS_FORCE_NO_PIPENV) { $OLD_VIRTUAL_ENV=$VIRTUAL_ENV Write-Host "> Activating virtualenv for Python tests in Quarto" . "$(pipenv --venv)/Scripts/activate.ps1" + Write-Host "> Using Python from " -NoNewline; Write-Host "$((gcm python).Source)" -ForegroundColor Blue; + Write-Host "> VIRTUAL_ENV: " -NoNewline; Write-Host "$($env:VIRTUAL_ENV)" -ForegroundColor Blue; $quarto_venv_activated = $true } @@ -159,11 +161,15 @@ $DENO_EXIT_CODE = $LASTEXITCODE If($quarto_venv_activated) { Write-Host "> Exiting virtualenv activated for tests" deactivate + Write-Host "> Using Python from " -NoNewline; Write-Host "$((gcm python).Source)" -ForegroundColor Blue; + Write-Host "> VIRTUAL_ENV: " -NoNewline; Write-Host "$($env:VIRTUAL_ENV)" -ForegroundColor Blue; Remove-Variable quarto_venv_activated } If($null -ne $OLD_VIRTUAL_ENV) { Write-Host "> Reactivating original virtualenv" . "$OLD_VIRTUAL_ENV/Scripts/activate.ps1" + Write-Host "> New Python from " -NoNewline; Write-Host "$((gcm python).Source)" -ForegroundColor Blue; + Write-Host "> VIRTUAL_ENV: " -NoNewline; Write-Host "$($env:VIRTUAL_ENV)" -ForegroundColor Blue; Remove-Variable OLD_VIRTUAL_ENV } diff --git a/tests/run-tests.sh b/tests/run-tests.sh index 088728006d..979f1702de 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -40,6 +40,8 @@ then OLD_VIRTUAL_ENV=$VIRTUAL_ENV echo "> Activating virtualenv for Python tests in Quarto" source "$(pipenv --venv)/bin/activate" + echo "> Using Python from $(which python)" + echo "> VIRTUAL_ENV: ${VIRTUAL_ENV}" quarto_venv_activated="true" fi @@ -118,12 +120,16 @@ if [[ $quarto_venv_activated == "true" ]] then echo "> Exiting virtualenv activated for tests" deactivate + echo "> Using Python from $(which python)" + echo "> VIRTUAL_ENV: ${VIRTUAL_ENV}" unset quarto_venv_activated fi if [[ -n $OLD_VIRTUAL_ENV ]] then echo "> Reactivating original virtualenv" source $OLD_VIRTUAL_ENV/bin/activate + echo "> Using Python from $(which python)" + echo "> VIRTUAL_ENV: ${VIRTUAL_ENV}" unset OLD_VIRTUAL_ENV fi