mirror of
https://github.com/ansible/awx.git
synced 2026-03-08 21:19:26 -02:30
These tests are known to only be executed partially or not at all. So we always get incomplete, missing, and sometimes flaky, coverage in the test functions that are expected to fail. This change updates the ``coverage.py`` config to prevent said tests from influencing the coverage level measurement. Ref https://github.com/pytest-dev/pytest/pull/12531
32 lines
632 B
INI
32 lines
632 B
INI
[run]
|
|
source = awx
|
|
branch = True
|
|
omit =
|
|
awx/main/migrations/*
|
|
awx/lib/site-packages/*
|
|
|
|
[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__.:
|
|
|
|
^\s*@pytest\.mark\.xfail
|
|
|
|
ignore_errors = True
|
|
|
|
[xml]
|
|
output = ./reports/coverage.xml
|