Skip to content
17 changes: 12 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ exclude_also = [
]

[tool.coverage.run]
parallel = true
source = ["src"]
omit = [
"bench/compress_normal.py",
"src/zarr/testing/conftest.py", # only for downstream projects
Expand All @@ -156,6 +158,7 @@ hooks.vcs.version-file = "src/zarr/_version.py"
dependency-groups = ["test"]

[tool.hatch.envs.test.env-vars]
COVERAGE_PROCESS_START = "pyproject.toml"

[[tool.hatch.envs.test.matrix]]
python = ["3.12", "3.13", "3.14"]
Expand All @@ -173,18 +176,21 @@ matrix.deps.dependency-groups = [

[tool.hatch.envs.test.scripts]
run-coverage = [
"coverage run --source=src -m pytest --ignore tests/benchmarks --junitxml=junit.xml -o junit_family=legacy {args:}",
"coverage run -m pytest -n auto --dist loadgroup --ignore tests/benchmarks --junitxml=junit.xml -o junit_family=legacy {args:}",
"coverage combine",
"coverage xml",
]
run-coverage-html = [
"coverage run --source=src -m pytest --ignore tests/benchmarks {args:}",
"coverage run -m pytest -n auto --dist loadgroup --ignore tests/benchmarks {args:}",
"coverage combine",
"coverage html",
]
run = "pytest --ignore tests/benchmarks"
run = "pytest -n auto --dist loadgroup --ignore tests/benchmarks {args:}"
run-verbose = "run-coverage --verbose"
run-mypy = "mypy src"
run-hypothesis = [
"coverage run --source=src -m pytest -nauto --run-slow-hypothesis tests/test_properties.py tests/test_store/test_stateful* {args:}",
"coverage run -m pytest -nauto --dist loadgroup --run-slow-hypothesis tests/test_properties.py tests/test_store/test_stateful* {args:}",
"coverage combine",
"coverage xml",
]
run-benchmark = "pytest --benchmark-enable tests/benchmarks"
Expand All @@ -203,7 +209,8 @@ python = ["3.12", "3.13"]

[tool.hatch.envs.gputest.scripts]
run-coverage = [
"coverage run --source=src -m pytest -m gpu --junitxml=junit.xml -o junit_family=legacy --ignore tests/benchmarks {args:}",
"coverage run -m pytest -m gpu --junitxml=junit.xml -o junit_family=legacy --ignore tests/benchmarks {args:}",
"coverage combine",
"coverage xml",
]
run = "pytest -m gpu --ignore tests/benchmarks"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_api/test_synchronous.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def test_docstrings_match(callable_name: str) -> None:
),
),
],
ids=str,
ids=["store_path-create_array_group", "store_path-create", "array_params-create_array_dataset"],
)
def test_docstring_consistent_parameters(
parameter_name: str, array_creation_routines: tuple[Callable[[Any], Any], ...]
Expand Down
3 changes: 3 additions & 0 deletions tests/test_store/test_fsspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
pytest.mark.filterwarnings(
"ignore:Exception ignored in.*finalize object.*:pytest.PytestUnraisableExceptionWarning"
),
# All S3 tests share a module-scoped moto server on a fixed port,
# so they must run on a single xdist worker to avoid port conflicts.
pytest.mark.xdist_group(name="s3"),
]

fsspec = pytest.importorskip("fsspec")
Expand Down
Loading