37 lines
1.6 KiB
PowerShell
37 lines
1.6 KiB
PowerShell
# PowerShell script to run Twitch Archive unit tests
|
|
# Run this script to execute all unit tests
|
|
|
|
Write-Host "======================================================================" -ForegroundColor Cyan
|
|
Write-Host "TWITCH ARCHIVE - Running Unit Tests" -ForegroundColor Cyan
|
|
Write-Host "======================================================================" -ForegroundColor Cyan
|
|
Write-Host ""
|
|
|
|
# Check if virtual environment exists and activate it
|
|
$venvPath = ".\venv314\Scripts\Activate.ps1"
|
|
if (Test-Path $venvPath) {
|
|
Write-Host "✓ Activating virtual environment..." -ForegroundColor Green
|
|
& $venvPath
|
|
} else {
|
|
Write-Host "⚠ Virtual environment not found at $venvPath" -ForegroundColor Yellow
|
|
Write-Host " Continuing with system Python..." -ForegroundColor Yellow
|
|
}
|
|
|
|
Write-Host ""
|
|
|
|
# Run the tests
|
|
Write-Host "Running unit tests..." -ForegroundColor Cyan
|
|
python test_twitch_archive_simple.py
|
|
|
|
# Check exit code
|
|
if ($LASTEXITCODE -eq 0) {
|
|
Write-Host ""
|
|
Write-Host "======================================================================" -ForegroundColor Green
|
|
Write-Host "✓ ALL TESTS PASSED" -ForegroundColor Green
|
|
Write-Host "======================================================================" -ForegroundColor Green
|
|
} else {
|
|
Write-Host ""
|
|
Write-Host "======================================================================" -ForegroundColor Red
|
|
Write-Host "✗ SOME TESTS FAILED" -ForegroundColor Red
|
|
Write-Host "======================================================================" -ForegroundColor Red
|
|
exit $LASTEXITCODE
|
|
}
|