Skip to content

Commit aa83d0e

Browse files
Joe Hammanshoyer
Joe Hamman
authored andcommitted
quick fix for failing zarr test (#1980)
1 parent 2f590f7 commit aa83d0e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

xarray/tests/test_backends.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1340,8 +1340,10 @@ def test_compressor_encoding(self):
13401340
import zarr
13411341
blosc_comp = zarr.Blosc(cname='zstd', clevel=3, shuffle=2)
13421342
save_kwargs = dict(encoding={'var1': {'compressor': blosc_comp}})
1343-
with self.roundtrip(original, save_kwargs=save_kwargs) as actual:
1344-
assert repr(actual.var1.encoding['compressor']) == repr(blosc_comp)
1343+
with self.roundtrip(original, save_kwargs=save_kwargs) as ds:
1344+
actual = ds['var1'].encoding['compressor']
1345+
# get_config returns a dictionary of compressor attributes
1346+
assert actual.get_config() == blosc_comp.get_config()
13451347

13461348
def test_group(self):
13471349
original = create_test_data()

0 commit comments

Comments
 (0)