added compose file referecen to pytest.ini; added coveragerc

This commit is contained in:
Matthias Bisping 2022-02-24 15:42:23 +01:00
parent ff1c7e319b
commit b20d6fd26b
2 changed files with 55 additions and 0 deletions

54
.coveragerc Normal file
View File

@ -0,0 +1,54 @@
# .coveragerc to control coverage.py
[run]
branch = True
omit =
*/site-packages/*
*/distutils/*
*/test/*
*/__init__.py
*/setup.py
*/venv/*
*/env/*
*/build_venv/*
*/build_env/*
source =
pyinfra
src
relative_files = True
data_file = .coverage
[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
# Don't complain about missing debug-only code:
def __repr__
if self\.debug
# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError
# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
omit =
*/site-packages/*
*/distutils/*
*/test/*
*/__init__.py
*/setup.py
*/venv/*
*/env/*
*/build_venv/*
*/build_env/*
ignore_errors = True
[html]
directory = reports
[xml]
output = reports/coverage.xml

View File

@ -1,4 +1,5 @@
[pytest]
log_cli = 1
log_cli_level = DEBUG
addopts = --docker-compose=docker-compose.yaml