Skip to content

Fix broken Zarr test #10109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions xarray/tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -2628,12 +2628,10 @@ def test_hidden_zarr_keys(self) -> None:
for var in expected.variables.keys():
assert self.DIMENSION_KEY not in expected[var].attrs

if has_zarr_v3:
# temporary workaround for https://github.com/zarr-developers/zarr-python/issues/2338
zarr_group.store._is_open = True

# put it back and try removing from a variable
del zarr_group["var2"].attrs[self.DIMENSION_KEY]
attrs = dict(zarr_group["var2"].attrs)
del attrs[self.DIMENSION_KEY]
zarr_group["var2"].attrs.put(attrs)

with pytest.raises(KeyError):
with xr.decode_cf(store):
Expand Down
Loading