Integrate pytest coverage configuration
This commit is contained in:
@@ -20,5 +20,10 @@ ViewIT ist ein Kodi‑Addon zum Durchsuchen und Abspielen von Inhalten der unter
|
|||||||
- Plugins: `addon/plugins/*_plugin.py`
|
- Plugins: `addon/plugins/*_plugin.py`
|
||||||
- Einstellungen: `addon/resources/settings.xml`
|
- Einstellungen: `addon/resources/settings.xml`
|
||||||
|
|
||||||
|
## Tests mit Abdeckung
|
||||||
|
- Dev-Abhängigkeiten installieren: `./.venv/bin/pip install -r requirements-dev.txt`
|
||||||
|
- Tests + Coverage starten: `./.venv/bin/pytest`
|
||||||
|
- Optional (XML-Report): `./.venv/bin/pytest --cov-report=xml`
|
||||||
|
|
||||||
## Dokumentation
|
## Dokumentation
|
||||||
Siehe `docs/`.
|
Siehe `docs/`.
|
||||||
|
|||||||
20
pyproject.toml
Normal file
20
pyproject.toml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
[tool.pytest.ini_options]
|
||||||
|
addopts = "-q --cov=addon --cov-report=term-missing"
|
||||||
|
python_files = ["test_*.py"]
|
||||||
|
norecursedirs = ["scripts"]
|
||||||
|
markers = [
|
||||||
|
"live: real HTTP requests (set LIVE_TESTS=1 to run)",
|
||||||
|
"perf: performance benchmarks",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.coverage.run]
|
||||||
|
source = ["addon"]
|
||||||
|
branch = true
|
||||||
|
omit = [
|
||||||
|
"*/__pycache__/*",
|
||||||
|
"addon/resources/*",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.coverage.report]
|
||||||
|
show_missing = true
|
||||||
|
skip_empty = true
|
||||||
2
requirements-dev.txt
Normal file
2
requirements-dev.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
pytest>=9,<10
|
||||||
|
pytest-cov>=5,<8
|
||||||
Reference in New Issue
Block a user