From 39815b38337ae5f5c39e998535e568b3e9e995a9 Mon Sep 17 00:00:00 2001 From: Unrud Date: Sat, 8 Sep 2018 14:42:21 +0200 Subject: [PATCH] configure coverage --- .coveragerc | 23 +++++++++++++++++++++++ setup.cfg | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..29f91ca --- /dev/null +++ b/.coveragerc @@ -0,0 +1,23 @@ +# .coveragerc to control coverage.py +[run] +branch = True +source = radicale + +[report] +# Regexes for lines to exclude from consideration +exclude_lines = + # Have to re-enable the standard pragma + pragma: no cover + + # 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 __name__ == .__main__.: + +omit = + tests/* + */tests/* + +ignore_errors = True diff --git a/setup.cfg b/setup.cfg index 6c7e202..ee99fdb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,5 +5,5 @@ test = pytest python-tag = py3 [tool:pytest] -addopts = --flake8 --isort --cov radicale -r s +addopts = --flake8 --isort --cov -r s norecursedirs = dist .cache .git build Radicale.egg-info .eggs venv