Skip to content

Commit 1adea58

Browse files
committed
chore: Configure coverage
1 parent b8baa9f commit 1adea58

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
3030
- name: Measure test coverage
3131
run: |
32-
python -m pytest --cov=lazy_loader --durations=10
32+
python -m pytest --cov --durations=10
3333
# Tests fail if using `--doctest-modules`. I.e.,
3434
# python -m pytest --cov=lazy_loader --doctest-modules --durations=20
3535

pyproject.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dependencies = [
2525
]
2626

2727
[project.optional-dependencies]
28-
test = ["pytest >= 8.0", "pytest-cov >= 5.0"]
28+
test = ["pytest >= 8.0", "pytest-cov >= 5.0", "coverage[toml] >= 7.2"]
2929
lint = ["pre-commit == 4.2.0"]
3030
dev = ["changelist == 0.5"]
3131

@@ -92,3 +92,13 @@ ignore = [
9292

9393
[tool.ruff.format]
9494
docstring-code-format = true
95+
96+
[tool.coverage.run]
97+
branch = true
98+
source = ["lazy_loader", "tests"]
99+
100+
[tool.coverage.paths]
101+
source = [
102+
"src/lazy_loader",
103+
"*/site-packages/lazy_loader",
104+
]

0 commit comments

Comments
 (0)