Skip to content

Commit 6f79c56

Browse files
committed
Pass dimension_separator on fixture generation (fix zarr-developers#858)
Under some test conditions (conda-forge, Debian builds), the fixtures directory is not available and is then re-created. When dimension_separator is not passed to DirectoryStore, then no metadata is assigned to the file. For the "flat" (as opposed to "flat_legacy") fixture, this meant that the NestedDirectoryStore did not correct its behavior leading to a failure. see: - conda-forge/zarr-feedstock#56 - zarr-developers#858
1 parent 72bd47a commit 6f79c56

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

zarr/tests/test_dim_separator.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import pytest
44
from numpy.testing import assert_array_equal
5+
from functools import partial
56

67
import zarr
78
from zarr.core import Array
@@ -43,9 +44,16 @@ def dataset(tmpdir, request):
4344
if not static.exists(): # pragma: no cover
4445

4546
if "nested" in which:
47+
# No way to reproduce the nested_legacy file via code
4648
generator = NestedDirectoryStore
4749
else:
48-
generator = DirectoryStore
50+
if "legacy" in suffix:
51+
# No dimension_separator metadata included
52+
generator = DirectoryStore
53+
else:
54+
# Explicit dimension_separator metadata included
55+
generator = partial(DirectoryStore,
56+
dimension_separator=".")
4957

5058
# store the data - should be one-time operation
5159
s = generator(str(static))

0 commit comments

Comments
 (0)