script to run full test suite with Cython modules, closes #6

This commit is contained in:
Florian Förster 2025-10-24 10:46:53 +02:00
parent 712a1f534a
commit 3e41aa34aa

View File

@ -0,0 +1,17 @@
Write-Output "[PWSH] Deleting compiled extension modules..."
Remove-Item ".\src\dopt_sensor_anomalies\*.pyd" -Force
Write-Output "[PWSH] Running tests..."
pdm run pytest --cov --cov-report=html --no-cov-on-fail
if ($? -eq $false){
Write-Output "[PWSH] Exiting script because there were failed tests"
Write-Output "[PWSH] No coverage report was generated"
Exit
}
Write-Output "[PWSH] Opening coverage report..."
Invoke-Item .\reports\coverage\index.html
Write-Output "[PWSH] Installing extension module..."
pdm install
Write-Output "[PWSH] Running test suite against extension module..."
pdm run pytest .\tests\test_detection.py