Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💅 Migrate coveragerc to use source_pkgs #12877

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
68 changes: 41 additions & 27 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -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
Loading