Skip to content

Commit 9311f4f

Browse files
Tarik Onalanalimanfoo
authored andcommitted
Style revisions
1 parent 7356b8b commit 9311f4f

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

zarr/tests/test_core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ def test_nchunks_initialized(self):
846846
z[:] = 42
847847
assert 10 == z.nchunks_initialized
848848

849-
def test_unstructured_array(self):
849+
def test_array_dtype_shape(self):
850850

851851
dt = "(2, 2)f4"
852852
# setup some data
@@ -925,7 +925,7 @@ def test_structured_array_subshapes(self):
925925
assert_array_equal(a['bar'], z['bar'])
926926
assert_array_equal(a['baz'], z['baz'])
927927
else:
928-
# BUG(onalant): https://www.github.com/numpy/numpy/issues/11946
928+
# workaround for numpy bug https://www.github.com/numpy/numpy/issues/11946
929929
assert a.tobytes() == z[...].tobytes()
930930

931931
def test_structured_array_nested(self):
@@ -958,7 +958,7 @@ def test_structured_array_nested(self):
958958
assert_array_equal(a['bar'], z['bar'])
959959
assert_array_equal(a['baz'], z['baz'])
960960
else:
961-
# BUG(onalant): https://www.github.com/numpy/numpy/issues/11946
961+
# workaround for numpy bug https://www.github.com/numpy/numpy/issues/11946
962962
assert a.tobytes() == z[...].tobytes()
963963

964964
def test_dtypes(self):
@@ -1645,7 +1645,7 @@ def test_astype(self):
16451645
expected = data.astype(astype)
16461646
assert_array_equal(expected, z2)
16471647

1648-
def test_unstructured_array(self):
1648+
def test_array_dtype_shape(self):
16491649
# skip this one, cannot do delta on unstructured array
16501650
pass
16511651

zarr/tests/test_meta.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def test_encode_decode_array_2():
116116
assert [df.get_config()] == meta_dec['filters']
117117

118118

119-
def test_encode_decode_array_unstructured():
119+
def test_encode_decode_array_dtype_shape():
120120

121121
meta = dict(
122122
shape=(100,),
@@ -146,12 +146,10 @@ def test_encode_decode_array_unstructured():
146146
# test decoding
147147
meta_dec = decode_array_metadata(meta_enc)
148148
assert ZARR_FORMAT == meta_dec['zarr_format']
149-
# NOTE(onalant): https://github.com/zarr-developers/zarr/pull/296#issuecomment-417608487
150-
# To maintain consistency with numpy unstructured arrays, unpack dimensions into shape.
149+
# to maintain consistency with numpy unstructured arrays, unpack dimensions into shape
151150
assert meta['shape'] + meta['dtype'].shape == meta_dec['shape']
152151
assert meta['chunks'] == meta_dec['chunks']
153-
# NOTE(onalant): https://github.com/zarr-developers/zarr/pull/296#issuecomment-417608487
154-
# To maintain consistency with numpy unstructured arrays, unpack dtypes.
152+
# to maintain consistency with numpy unstructured arrays, unpack dtypes
155153
assert meta['dtype'].base == meta_dec['dtype']
156154
assert meta['compressor'] == meta_dec['compressor']
157155
assert meta['order'] == meta_dec['order']
@@ -189,12 +187,10 @@ def test_encode_decode_array_structured():
189187
# test decoding
190188
meta_dec = decode_array_metadata(meta_enc)
191189
assert ZARR_FORMAT == meta_dec['zarr_format']
192-
# NOTE(onalant): https://github.com/zarr-developers/zarr/pull/296#issuecomment-417608487
193-
# To maintain consistency with numpy unstructured arrays, unpack dimensions into shape.
190+
# to maintain consistency with numpy unstructured arrays, unpack dimensions into shape
194191
assert meta['shape'] + meta['dtype'].shape == meta_dec['shape']
195192
assert meta['chunks'] == meta_dec['chunks']
196-
# NOTE(onalant): https://github.com/zarr-developers/zarr/pull/296#issuecomment-417608487
197-
# To maintain consistency with numpy unstructured arrays, unpack dtypes.
193+
# to maintain consistency with numpy unstructured arrays, unpack dimensions into shape
198194
assert meta['dtype'].base == meta_dec['dtype']
199195
assert meta['compressor'] == meta_dec['compressor']
200196
assert meta['order'] == meta_dec['order']

0 commit comments

Comments
 (0)