$total = 0
$passed = 0
$failed = 0

$testFiles = Get-ChildItem tests/test_*.py | Select-Object -ExpandProperty Name

Write-Host "Running full test suite..."
Write-Host "==========================="

foreach ($file in $testFiles) {
    Write-Host "Testing: $file"
    $result = uv run pytest "tests/$file" -q --tb=no 2>&1 | Select-String -Pattern "passed|failed"
    
    if ($result -match "(\d+) passed") {
        $p = [int]$matches[1]
        $passed += $p
        $total += $p
    }
    if ($result -match "(\d+) failed") {
        $f = [int]$matches[1]
        $failed += $f
        $total += $f
    }
}

Write-Host ""
Write-Host "==========================="
Write-Host "TOTAL: $total tests"
Write-Host "PASSED: $passed"
Write-Host "FAILED: $failed"
