Tests überarbeitet, Mocks und coverage eingefügt

This commit is contained in:
2025-12-17 17:45:18 +01:00
parent 2d67ce8adc
commit f64d56d4bc
17 changed files with 562 additions and 201 deletions

52
test/test_qgis.bat Normal file
View File

@@ -0,0 +1,52 @@
@echo off
setlocal
echo BATCH WIRD AUSGEFÜHRT
pause
echo ================================================
echo Starte Tests in QGIS-Python-Umgebung
echo ================================================
REM Pfad zur QGIS-Installation
set QGIS_BIN=D:\OSGeo\bin
REM Prüfen, ob python-qgis.bat existiert
if not exist "%QGIS_BIN%\python-qgis.bat" (
echo.
echo [FEHLER] python-qgis.bat wurde nicht gefunden!
echo Erwarteter Pfad:
echo %QGIS_BIN%\python-qgis.bat
echo.
echo Bitte korrigiere den Pfad in test_qgis.bat.
echo.
pause
exit /b 1
)
echo.
echo [INFO] QGIS-Python gefunden. Starte Tests...
echo.
"%QGIS_BIN%\python-qgis.bat" -m coverage run run_tests.py
if errorlevel 1 (
echo.
echo [FEHLER] Testlauf fehlgeschlagen.
echo.
pause
exit /b 1
)
echo.
echo ================================================
echo Coverage HTML-Bericht wird erzeugt...
echo ================================================
"%QGIS_BIN%\python-qgis.bat" -m coverage html
echo.
echo Fertig!
echo Öffne jetzt: coverage_html\index.html
echo ================================================
pause
endlocal