You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
604 B
PowerShell
25 lines
604 B
PowerShell
param(
|
|
[string]$VenvDir = ".venv"
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
Write-Host "Creating virtual environment in '$VenvDir'..."
|
|
python -m venv $VenvDir
|
|
|
|
$pythonExe = Join-Path $VenvDir "Scripts\python.exe"
|
|
if (-not (Test-Path $pythonExe)) {
|
|
throw "Python executable not found in virtual environment: $pythonExe"
|
|
}
|
|
|
|
Write-Host "Upgrading pip..."
|
|
& $pythonExe -m pip install --upgrade pip
|
|
|
|
Write-Host "Installing required packages..."
|
|
& $pythonExe -m pip install pytest
|
|
|
|
Write-Host ""
|
|
Write-Host "Done."
|
|
Write-Host "Activate venv: .\$VenvDir\Scripts\Activate.ps1"
|
|
Write-Host "Run tests: pytest -q"
|