Skip to content

Commit

Permalink
pyproject: import coverage.py config (pypi#14758)
Browse files Browse the repository at this point in the history
* pyproject: import coverage.py config

On Python 3.11+, coverage.py natively supports
pyproject.toml without needing the `toml` extra.

* pyproject: syntax
  • Loading branch information
woodruffw authored Oct 17, 2023
1 parent 256d3e3 commit 8304c39
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 31 deletions.
31 changes: 0 additions & 31 deletions .coveragerc

This file was deleted.

30 changes: 30 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
[tool.coverage.run]
branch = true
dynamic_context = "test_function"
source = ["warehouse"]
omit = [
# We don't want to get coverage information for our migrations.
"warehouse/migrations/*",

# We don't want to actually cover our __main__.py file because it is hard
# to cover and it really just acts as a tiny shim to a function.
"warehouse/__main__.py",

# Again, tiny shim code that we don't actually need to test and trying to
# do so would just get in the way.
"warehouse/wsgi.py",

# And again, tiny shim code.
"warehouse/celery.py",
]

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"class \\w+\\(Interface\\):",
"if (typing\\.)?TYPE_CHECKING:",
]

# Don't show us anything that's already 100% covered.
skip_covered = true

[tool.curlylint]
include = '\.(html|jinja|txt)$'
# For jinja's i18n extension:
Expand Down

0 comments on commit 8304c39

Please sign in to comment.