From 6d890991e8b4a556ac0f33deb913ebf68f952505 Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Thu, 28 Mar 2024 10:37:12 -0600 Subject: [PATCH] fix test --- xarray/tests/test_backends.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xarray/tests/test_backends.py b/xarray/tests/test_backends.py index e503a517947..248c873d50f 100644 --- a/xarray/tests/test_backends.py +++ b/xarray/tests/test_backends.py @@ -2467,7 +2467,6 @@ def test_group(self) -> None: ) as actual: assert_identical(original, actual) - @requires_zarr def test_zarr_mode_w_overwrites_encoding(self) -> None: import zarr @@ -2476,14 +2475,18 @@ def test_zarr_mode_w_overwrites_encoding(self) -> None: data.to_zarr( store, **self.version_kwargs, encoding={"foo": {"add_offset": 1}} ) - np.testing.assert_equal(zarr.open_group(store)["foo"], data.foo.data - 1) + np.testing.assert_equal( + zarr.open_group(store, **self.version_kwargs)["foo"], data.foo.data - 1 + ) data.to_zarr( store, **self.version_kwargs, encoding={"foo": {"add_offset": 0}}, mode="w", ) - np.testing.assert_equal(zarr.open_group(store)["foo"], data.foo.data) + np.testing.assert_equal( + zarr.open_group(store, **self.version_kwargs)["foo"], data.foo.data + ) def test_encoding_kwarg_fixed_width_string(self) -> None: # not relevant for zarr, since we don't use EncodedStringCoder