Skip to content

Commit 1f0e2e7

Browse files
committed
Parallel coverage
1 parent 943a2ab commit 1f0e2e7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

pyproject.toml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ exclude_also = [
141141
]
142142

143143
[tool.coverage.run]
144+
parallel = true
145+
source = ["src"]
144146
omit = [
145147
"bench/compress_normal.py",
146148
"src/zarr/testing/conftest.py", # only for downstream projects
@@ -173,18 +175,21 @@ matrix.deps.dependency-groups = [
173175

174176
[tool.hatch.envs.test.scripts]
175177
run-coverage = [
176-
"coverage run --source=src -m pytest -n auto --ignore tests/benchmarks --junitxml=junit.xml -o junit_family=legacy {args:}",
178+
"COVERAGE_PROCESS_START=pyproject.toml coverage run -m pytest -n auto --ignore tests/benchmarks --junitxml=junit.xml -o junit_family=legacy {args:}",
179+
"coverage combine",
177180
"coverage xml",
178181
]
179182
run-coverage-html = [
180-
"coverage run --source=src -m pytest -n auto --ignore tests/benchmarks {args:}",
183+
"COVERAGE_PROCESS_START=pyproject.toml coverage run -m pytest -n auto --ignore tests/benchmarks {args:}",
184+
"coverage combine",
181185
"coverage html",
182186
]
183187
run = "pytest -n auto --ignore tests/benchmarks {args:}"
184188
run-verbose = "run-coverage --verbose"
185189
run-mypy = "mypy src"
186190
run-hypothesis = [
187-
"coverage run --source=src -m pytest -nauto --run-slow-hypothesis tests/test_properties.py tests/test_store/test_stateful* {args:}",
191+
"COVERAGE_PROCESS_START=pyproject.toml coverage run -m pytest -nauto --run-slow-hypothesis tests/test_properties.py tests/test_store/test_stateful* {args:}",
192+
"coverage combine",
188193
"coverage xml",
189194
]
190195
run-benchmark = "pytest --benchmark-enable tests/benchmarks"

0 commit comments

Comments
 (0)