diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..41d11e8 --- /dev/null +++ b/.coveragerc @@ -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 diff --git a/pytest.ini b/pytest.ini index 19deb86..9b18a42 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,4 +1,5 @@ [pytest] log_cli = 1 log_cli_level = DEBUG +addopts = --docker-compose=docker-compose.yaml