@@ -155,10 +155,6 @@ hooks.vcs.version-file = "src/zarr/_version.py"
155155dependency-groups = [" test" ]
156156
157157[tool .hatch .envs .test .env-vars ]
158- # Required to test with a pytest plugin; see https://pytest-cov.readthedocs.io/en/latest/plugins.html
159- COV_CORE_SOURCE = " src"
160- COV_CORE_CONFIG = " .coveragerc"
161- COV_CORE_DATAFILE = " .coverage.eager"
162158
163159[[tool .hatch .envs .test .matrix ]]
164160python = [" 3.12" , " 3.13" , " 3.14" ]
@@ -175,13 +171,23 @@ matrix.deps.dependency-groups = [
175171]
176172
177173[tool .hatch .envs .test .scripts ]
178- run-coverage = " pytest --cov-config=pyproject.toml --cov=src --cov-append --cov-report xml --junitxml=junit.xml -o junit_family=legacy"
179- run-coverage-html = " pytest --cov-config=pyproject.toml --cov=src --cov-append --cov-report html"
180- run = " run-coverage --no-cov --ignore tests/benchmarks"
174+ run-coverage = [
175+ " coverage run --source=src -m pytest --junitxml=junit.xml -o junit_family=legacy {args:}" ,
176+ " coverage xml" ,
177+ ]
178+ run-coverage-html = [
179+ " coverage run --source=src -m pytest {args:}" ,
180+ " coverage html" ,
181+ ]
182+ run = " pytest --ignore tests/benchmarks"
181183run-verbose = " run-coverage --verbose"
182184run-mypy = " mypy src"
183- run-hypothesis = " run-coverage -nauto --run-slow-hypothesis tests/test_properties.py tests/test_store/test_stateful*"
185+ run-hypothesis = [
186+ " coverage run --source=src -m pytest -nauto --run-slow-hypothesis tests/test_properties.py tests/test_store/test_stateful* {args:}" ,
187+ " coverage xml" ,
188+ ]
184189run-benchmark = " pytest --benchmark-enable tests/benchmarks"
190+ serve-coverage-html = " python -m http.server -d htmlcov 8000"
185191list-env = " pip list"
186192
187193[tool .hatch .envs .gputest ]
@@ -195,8 +201,11 @@ features = ["gpu"]
195201python = [" 3.12" , " 3.13" ]
196202
197203[tool .hatch .envs .gputest .scripts ]
198- run-coverage = " pytest -m gpu --cov-config=pyproject.toml --cov=src --cov-report xml --junitxml=junit.xml -o junit_family=legacy --ignore tests/benchmarks"
199- run = " run-coverage --no-cov"
204+ run-coverage = [
205+ " coverage run --source=src -m pytest -m gpu --junitxml=junit.xml -o junit_family=legacy --ignore tests/benchmarks {args:}" ,
206+ " coverage xml" ,
207+ ]
208+ run = " pytest -m gpu --ignore tests/benchmarks"
200209
201210[tool .hatch .envs .upstream ]
202211template = ' test'
0 commit comments