Skip to content

Commit c2882ad

Browse files
committed
Tests: Configure pytest and coverage in pyproject.toml
1 parent 6c831ba commit c2882ad

File tree

2 files changed

+38
-13
lines changed

2 files changed

+38
-13
lines changed

.coveragerc

Lines changed: 0 additions & 12 deletions
This file was deleted.

pyproject.toml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,40 @@ dependencies = [
4141
[dependency-groups]
4242
dev = [
4343
"certifi>=2025.10.5",
44+
"coverage<8",
4445
"mypy<1.19",
4546
"poethepoet<1",
4647
"pytest<9",
47-
"pytest-cov<8",
4848
"pytz>=2025.2",
4949
"ruff<0.15",
5050
"setuptools>=80.9.0",
5151
"stopit<1.2",
5252
]
5353

5454

55+
[tool.coverage.run]
56+
branch = false
57+
omit = [
58+
"tests/*",
59+
]
60+
source = [ "src" ]
61+
62+
[tool.coverage.report]
63+
fail_under = 0
64+
show_missing = true
65+
exclude_lines = [
66+
"# pragma: no cover",
67+
"raise NotImplemented",
68+
]
69+
omit = [
70+
"*/.buildout/eggs/*",
71+
"buildout-cache/eggs/*",
72+
"eggs/*",
73+
"parts/*",
74+
"src/crate/client/_pep440.py",
75+
]
76+
77+
5578
[tool.mypy]
5679
mypy_path = "src"
5780
packages = [
@@ -68,6 +91,20 @@ namespace_packages = true
6891
non_interactive = true
6992

7093

94+
[tool.pytest.ini_options]
95+
addopts = "-rA --verbosity=3"
96+
minversion = "2.0"
97+
log_level = "DEBUG"
98+
log_cli_level = "DEBUG"
99+
testpaths = [
100+
"src",
101+
"tests",
102+
]
103+
xfail_strict = true
104+
markers = [
105+
]
106+
107+
71108
[tool.ruff]
72109
line-length = 80
73110

0 commit comments

Comments
 (0)