Skip to content

Commit

Permalink
Upgrade coverage (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
Secrus committed Dec 4, 2023
1 parent 0c2fc55 commit 8a0cfee
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 29 deletions.
27 changes: 0 additions & 27 deletions .coveragerc

This file was deleted.

31 changes: 30 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ tests = [
"pytest",
"pytest-cov",
"pytest-timeout",
"coverage<5",
"coverage[toml]",
]
dev = [
"parver",
Expand Down Expand Up @@ -145,6 +145,35 @@ runtime-evaluated-base-classes = [
known-first-party = ["pythonfinder"]
required-imports = ["from __future__ import annotations"]

[tool.coverage.run]
branch = true
source = ["src/pythonfinder/"]
omit = ["src/pythonfinder/_vendor/*"]

[tool.coverage.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__.:"
]
[tool.coverage.html]
directory = "htmlcov"

[tool.coverage.xml]
output = "coverage.xml"


[tool.towncrier]
package = "pythonfinder"
package_dir = "src"
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ install_command = python -m pip install {opts} {packages} --upgrade-strategy=eag
usedevelop = True

[testenv:coverage-report]
deps = coverage
deps = coverage[toml]
skip_install = true
commands =
coverage combine
Expand Down

0 comments on commit 8a0cfee

Please sign in to comment.