Skip to content

Commit a6ea397

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix-sharding-ranges
2 parents 0cdc04b + e35c4fc commit a6ea397

40 files changed

+27
-19
lines changed

pyproject.toml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ run-coverage-gpu = "pip install cupy-cuda12x && pytest -m gpu --cov-config=pypro
153153
run = "run-coverage --no-cov"
154154
run-verbose = "run-coverage --verbose"
155155
run-mypy = "mypy src"
156-
run-hypothesis = "pytest --hypothesis-profile ci tests/v3/test_properties.py tests/v3/test_store/test_stateful*"
156+
run-hypothesis = "pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
157157
list-env = "pip list"
158158

159159
[tool.hatch.envs.gputest]
@@ -173,7 +173,7 @@ run-coverage = "pytest -m gpu --cov-config=pyproject.toml --cov=pkg --cov=tests"
173173
run = "run-coverage --no-cov"
174174
run-verbose = "run-coverage --verbose"
175175
run-mypy = "mypy src"
176-
run-hypothesis = "pytest --hypothesis-profile ci tests/v3/test_properties.py tests/v3/test_store/test_stateful*"
176+
run-hypothesis = "pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
177177
list-env = "pip list"
178178

179179
[tool.hatch.envs.docs]
@@ -282,18 +282,17 @@ ignore_errors = true
282282

283283
[[tool.mypy.overrides]]
284284
module = [
285-
"tests.v2.*",
286-
"tests.v3.package_with_entrypoint.*",
287-
"tests.v3.test_codecs.test_codecs",
288-
"tests.v3.test_codecs.test_transpose",
289-
"tests.v3.test_metadata.*",
290-
"tests.v3.test_store.*",
291-
"tests.v3.test_config",
292-
"tests.v3.test_group",
293-
"tests.v3.test_indexing",
294-
"tests.v3.test_properties",
295-
"tests.v3.test_sync",
296-
"tests.v3.test_v2",
285+
"tests.package_with_entrypoint.*",
286+
"tests.test_codecs.test_codecs",
287+
"tests.test_codecs.test_transpose",
288+
"tests.test_metadata.*",
289+
"tests.test_store.*",
290+
"tests.test_config",
291+
"tests.test_group",
292+
"tests.test_indexing",
293+
"tests.test_properties",
294+
"tests.test_sync",
295+
"tests.test_v2",
297296
]
298297
ignore_errors = true
299298

src/zarr/testing/utils.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Any, cast
3+
from collections.abc import Callable, Coroutine
4+
from typing import TYPE_CHECKING, Any, TypeVar, cast
45

56
import pytest
67

@@ -37,8 +38,16 @@ def has_cupy() -> bool:
3738
return False
3839

3940

41+
T_Callable = TypeVar("T_Callable", bound=Callable[[], Coroutine[Any, Any, None]])
42+
43+
4044
# Decorator for GPU tests
41-
def gpu_test(func: Any) -> Any:
42-
return pytest.mark.gpu(
43-
pytest.mark.skipif(not has_cupy(), reason="CuPy not installed or no GPU available")(func)
45+
def gpu_test(func: T_Callable) -> T_Callable:
46+
return cast(
47+
T_Callable,
48+
pytest.mark.gpu(
49+
pytest.mark.skipif(not has_cupy(), reason="CuPy not installed or no GPU available")(
50+
func
51+
)
52+
),
4453
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)