Skip to content

Commit 7655206

Browse files
committed
Exclude causalpy/tests from code coverage
1 parent 491adc1 commit 7655206

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

codecov.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
coverage:
2+
ignore:
3+
- "*/conftest.py"
4+
- "*/tests/conftest.py"
25
status:
36
project:
47
default:

pyproject.toml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ docs = [
7272
lint = ["interrogate", "pre-commit", "ruff"]
7373
test = ["pytest", "pytest-cov", "codespell", "nbformat", "nbconvert"]
7474

75-
[metadata]
76-
description-file = 'README.md'
77-
license_files = 'LICENSE'
78-
7975
[project.urls]
8076
Homepage = "https://github.com/pymc-labs/CausalPy"
8177
"Bug Reports" = "https://github.com/pymc-labs/CausalPy/issues"
@@ -130,3 +126,23 @@ extend-select = [
130126
[tool.codespell]
131127
ignore-words = "./docs/source/.codespell/codespell-whitelist.txt"
132128
skip = "*.ipynb,*.csv,pyproject.toml,docs/source/.codespell/codespell-whitelist.txt"
129+
130+
[tool.coverage.run]
131+
omit = [
132+
"*/conftest.py",
133+
"*/tests/conftest.py",
134+
]
135+
136+
[tool.coverage.report]
137+
exclude_lines = [
138+
"pragma: no cover",
139+
"def __repr__",
140+
"if self.debug:",
141+
"if settings.DEBUG",
142+
"raise AssertionError",
143+
"raise NotImplementedError",
144+
"if 0:",
145+
"if __name__ == .__main__.:",
146+
"class .*\\bProtocol\\):",
147+
"@(abc\\.)?abstractmethod",
148+
]

0 commit comments

Comments
 (0)