Skip to content

Commit c21547c

Browse files
committed
minimally working test_xarray
1 parent cf296dd commit c21547c

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

pyproject.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,26 @@ run-mypy = "mypy src"
212212
run-hypothesis = "pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
213213
list-env = "pip list"
214214

215+
[tool.hatch.envs.downstream]
216+
python = "3.13"
217+
dependencies = [
218+
'xarray @ git+https://github.com/pydata/xarray.git', # TODO from main until xarray>2024.11.0
219+
'numpy',
220+
'numcodecs',
221+
'typing_extensions',
222+
'donfig',
223+
# test deps
224+
'hypothesis',
225+
'pytest',
226+
'pytest-cov',
227+
'pytest-asyncio',
228+
]
229+
230+
[tool.hatch.envs.downstream.scripts]
231+
run = "pytest --verbose"
232+
run-mypy = "mypy src"
233+
list-env = "pip list"
234+
215235
[tool.hatch.envs.min_deps]
216236
description = """Test environment for minimum supported dependencies
217237

tests/test_xarray.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,8 @@ def dataset(
6262

6363
def test_roundtrip(store: zarr.abc.store.Store, dataset: xr.Dataset) -> None:
6464
dataset.to_zarr(store)
65-
other_dataset = xr.open_dataset(store)
65+
other_dataset = xr.open_dataset(store, engine="zarr")
66+
assert dataset.identical(other_dataset)
67+
68+
other_dataset = xr.open_zarr(store)
6669
assert dataset.identical(other_dataset)

0 commit comments

Comments
 (0)