Skip to content

Commit

Permalink
Add coverage settings to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryp Toon committed Jun 5, 2024
1 parent 4d8e8bf commit 07e409d
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,60 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.coverage.run]
branch = true
relative_files = true

omit = [
"*bitcoinlib/tools/*",
"*dashd.py",
"*bitcoind.py",
"*dogecoind.py",
"*bcoin.py",
"*litecoind.py",
"*authproxy.py",
"*cryptoid.py",
"*chainso.py",
"*litecoreio.py",
"*insightdash.py",
"*litecoinblockexplorer.py",
"*bitflyer.py",
]

[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_also = [
# 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__.:",

# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",

# Bitcoinlib
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"if not PY3",
]
omit = [
]

ignore_errors = true

[tool.coverage.html]
directory = "coverage_html_report"

0 comments on commit 07e409d

Please sign in to comment.