Skip to content

Commit 63b6b81

Browse files
committed
Tests: Use pytest-cov, and configure in pyproject.toml
1 parent c00c587 commit 63b6b81

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

pyproject.toml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,29 @@ omit = [
7878
]
7979

8080

81+
[tool.coverage.run]
82+
branch = false
83+
omit = [
84+
"tests/*",
85+
]
86+
source = [ "src" ]
87+
88+
[tool.coverage.report]
89+
fail_under = 0
90+
show_missing = true
91+
exclude_lines = [
92+
"# pragma: no cover",
93+
"raise NotImplemented",
94+
]
95+
omit = [
96+
"*/.buildout/eggs/*",
97+
"buildout-cache/eggs/*",
98+
"eggs/*",
99+
"parts/*",
100+
"src/crate/client/_pep440.py",
101+
]
102+
103+
81104
[tool.mypy]
82105
mypy_path = "src"
83106
packages = [
@@ -95,7 +118,7 @@ non_interactive = true
95118

96119

97120
[tool.pytest.ini_options]
98-
addopts = "-rA --verbosity=3"
121+
addopts = "-rA --verbosity=3 --cov --cov-report=term-missing --cov-report=xml"
99122
minversion = "2.0"
100123
log_level = "DEBUG"
101124
log_cli_level = "DEBUG"

0 commit comments

Comments
 (0)