diff --git a/.gitignore b/.gitignore index f02d35f..ada0c6f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ ~* Makefile coverage.xml +!tests/.coveragerc !.dockerignore !.gitignore !.pdm-python diff --git a/tests/.coveragerc b/tests/.coveragerc new file mode 100644 index 0000000..280ba3f --- /dev/null +++ b/tests/.coveragerc @@ -0,0 +1,35 @@ +[run] +branch = True +source = hope_country_workspace + +omit = + */tests/** + */migrations/*, + */wsgi.py, + + +[report] +# Regexes for lines to exclude from consideration +exclude_lines = + # Have to re-enable the standard pragma + pragma: no cover + 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 + except ImportError + # Don't complain if non-runnable code isn't run: + #if 0: + if __name__ == .__main__.: + if TYPE_CHECKING: + if settings.DEBUG: + +#fail_under = 95 + +ignore_errors = True + +[html] +directory = ~build/coverage