diff --git a/.coveragerc b/.coveragerc index b810471417f..75226ac147c 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,33 +1,47 @@ -[run] -include = - src/* - testing/* - */lib/python*/site-packages/_pytest/* - */lib/python*/site-packages/pytest.py - */pypy*/site-packages/_pytest/* - */pypy*/site-packages/pytest.py - *\Lib\site-packages\_pytest\* - *\Lib\site-packages\pytest.py -parallel = 1 -branch = 1 +[html] +show_contexts = true +skip_covered = false [paths] -source = src/ - */lib/python*/site-packages/ - */pypy*/site-packages/ - *\Lib\site-packages\ +_site-packages-to-src-mapping = + src + */src + *\src + */lib/pypy*/site-packages + */lib/python*/site-packages + *\Lib\site-packages [report] -skip_covered = True -show_missing = True -exclude_lines = - \#\s*pragma: no cover - ^\s*raise NotImplementedError\b - ^\s*return NotImplemented\b - ^\s*assert False(,|$) - ^\s*assert_never\( +skip_covered = true +skip_empty = true +show_missing = true +exclude_also = + \#\s*pragma: no cover + ^\s*raise NotImplementedError\b + ^\s*return NotImplemented\b + ^\s*assert False(,|$) + ^\s*assert_never\( + + ^\s*if TYPE_CHECKING: + ^\s*@overload( |$) - ^\s*if TYPE_CHECKING: - ^\s*@overload( |$) + ^\s*@pytest\.mark\.xfail - ^\s*@pytest\.mark\.xfail +[run] +branch = true +cover_pylib = false +# https://coverage.rtfd.io/en/latest/contexts.html#dynamic-contexts +# `dynamic_context` conflicts with `pytest-cov` if set here +dynamic_context = test_function +omit = + test_eggs.py + test_ham.py + test_spam.py +parallel = true +plugins = +relative_files = true +source = + . +source_pkgs = + _pytest + pytest