Skip to content

Commit

Permalink
Upgrade coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Secrus committed Oct 22, 2023
1 parent c62179d commit ab224da
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 @@ -45,7 +45,7 @@ tests = [
"pytest",
"pytest-cov",
"pytest-timeout",
"coverage<5",
"coverage[toml]",
]
dev = [
"parver",
Expand Down Expand Up @@ -146,6 +146,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 @@ -21,7 +21,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 ab224da

Please sign in to comment.