Skip to content

Commit 04aeb50

Browse files
committed
get tox tests running
1 parent 64e16d2 commit 04aeb50

File tree

3 files changed

+22
-13
lines changed

3 files changed

+22
-13
lines changed

docs/api/storage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ can be used as a Zarr array store.
99
.. autofunction:: init_array
1010
.. autofunction:: init_group
1111

12-
.. autoclass:: MemoryStore
12+
.. autoclass:: DictStore
1313
.. autoclass:: DirectoryStore
1414
.. autoclass:: ZipStore

zarr/blosc.c

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

zarr/tests/test_meta.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import numpy as np
88

99

10+
from zarr.compat import PY2
1011
from zarr.meta import decode_array_metadata, encode_dtype, decode_dtype, \
1112
ZARR_FORMAT
1213
from zarr.errors import MetadataError
@@ -15,7 +16,7 @@
1516
def test_decode_array():
1617

1718
# typical
18-
b = b'''{
19+
b = '''{
1920
"zarr_format": %s,
2021
"shape": [100],
2122
"chunks": [10],
@@ -24,7 +25,9 @@ def test_decode_array():
2425
"compression_opts": 1,
2526
"fill_value": null,
2627
"order": "C"
27-
}''' % str(ZARR_FORMAT).encode('ascii')
28+
}''' % ZARR_FORMAT
29+
if not PY2:
30+
b = b.encode('ascii')
2831
meta = decode_array_metadata(b)
2932
eq(ZARR_FORMAT, meta['zarr_format'])
3033
eq((100,), meta['shape'])
@@ -36,7 +39,7 @@ def test_decode_array():
3639
eq('C', meta['order'])
3740

3841
# variations
39-
b = b'''{
42+
b = '''{
4043
"zarr_format": %s,
4144
"shape": [100, 100],
4245
"chunks": [10, 10],
@@ -49,7 +52,9 @@ def test_decode_array():
4952
},
5053
"fill_value": 42,
5154
"order": "F"
52-
}''' % str(ZARR_FORMAT).encode('ascii')
55+
}''' % ZARR_FORMAT
56+
if not PY2:
57+
b = b.encode('ascii')
5358
meta = decode_array_metadata(b)
5459
eq(ZARR_FORMAT, meta['zarr_format'])
5560
eq((100, 100), meta['shape'])
@@ -63,7 +68,7 @@ def test_decode_array():
6368
eq('F', meta['order'])
6469

6570
# unsupported format
66-
b = b'''{
71+
b = '''{
6772
"zarr_format": %s,
6873
"shape": [100],
6974
"chunks": [10],
@@ -72,14 +77,18 @@ def test_decode_array():
7277
"compression_opts": 1,
7378
"fill_value": null,
7479
"order": "C"
75-
}''' % str(ZARR_FORMAT - 1).encode('ascii')
80+
}''' % (ZARR_FORMAT - 1)
81+
if not PY2:
82+
b = b.encode('ascii')
7683
with assert_raises(MetadataError):
7784
decode_array_metadata(b)
7885

7986
# missing fields
80-
b = b'''{
87+
b = '''{
8188
"zarr_format": %s
82-
}''' % str(ZARR_FORMAT).encode('ascii')
89+
}''' % ZARR_FORMAT
90+
if not PY2:
91+
b = b.encode('ascii')
8392
with assert_raises(MetadataError):
8493
decode_array_metadata(b)
8594

0 commit comments

Comments
 (0)