Skip to content

Commit 7976bd8

Browse files
committed
Run minimal tests without fsspec, requests, aiohttp
1 parent 64b9a37 commit 7976bd8

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

pyproject.toml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,25 @@ gpu = [
7272
test = [
7373
"coverage",
7474
"pytest",
75+
"pytest-asyncio",
7576
"pytest-cov",
77+
"pytest-accept",
78+
"rich",
79+
"mypy",
80+
"hypothesis",
81+
]
82+
remote_tests = [
7683
'zarr[remote]',
84+
'zarr[optional]',
7785
"botocore",
7886
"s3fs",
7987
"moto[s3,server]",
80-
"pytest-asyncio",
81-
"pytest-accept",
8288
"requests",
89+
]
90+
optional = [
8391
"rich",
84-
"mypy",
85-
"hypothesis",
86-
"universal-pathlib",
92+
"universal_pathlib"
8793
]
88-
optional = ["rich", "universal-pathlib"]
8994
docs = [
9095
# Doc building
9196
'sphinx==8.1.3',
@@ -134,7 +139,6 @@ build.hooks.vcs.version-file = "src/zarr/_version.py"
134139
[tool.hatch.envs.test]
135140
dependencies = [
136141
"numpy~={matrix:numpy}",
137-
"universal_pathlib",
138142
]
139143
features = ["test"]
140144

@@ -146,7 +150,7 @@ version = ["minimal"]
146150
[[tool.hatch.envs.test.matrix]]
147151
python = ["3.11", "3.12", "3.13"]
148152
numpy = ["1.25", "2.1"]
149-
features = ["optional"]
153+
features = ["remote_tests"]
150154

151155
[[tool.hatch.envs.test.matrix]]
152156
python = ["3.11", "3.12", "3.13"]

tests/test_store/test_core.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import importlib
12
import tempfile
23
from pathlib import Path
34

@@ -119,6 +120,8 @@ async def test_make_store_path_invalid() -> None:
119120
await make_store_path(1) # type: ignore[arg-type]
120121

121122

123+
@pytest.mark.skipif(not importlib.util.find_spec("requests"), reason="requires requests")
124+
@pytest.mark.skipif(not importlib.util.find_spec("aiohttp"), reason="requires aiohttp")
122125
async def test_make_store_path_fsspec(monkeypatch) -> None:
123126
pytest.importorskip("fsspec")
124127
store_path = await make_store_path("http://foo.com/bar")

0 commit comments

Comments
 (0)