Skip to content

Commit 5fe5aea

Browse files
Be more robust in how regression data are discovered (#821)
* Ensure a test opens an expected array as read-only Avoid creating an empty array when test_open does not find the expected existing array. * Ensure that the test fixture can be found Regardless of the test runner working directory, ensure that this test fixture returns the path to the relevant regression data directory, which lives under the project root. * Pass path strings, not pathlib.Paths, to FSStore * Add release note
1 parent cba2783 commit 5fe5aea

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

docs/release.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ Release notes
66
Unreleased
77
----------
88

9+
.. _release_2.9.2:
10+
11+
Maintenance
12+
~~~~~~~~~~~
13+
14+
* Correct conda-forge deployment of Zarr by fixing some Zarr tests.
15+
By :user:`Ben Williams <benjaminhwilliams>`; :issue:`821`.
16+
17+
918
.. _release_2.9.1:
1019

1120
Maintenance

zarr/tests/test_dim_separator.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import pathlib
2+
13
import pytest
24
from numpy.testing import assert_array_equal
35

@@ -29,10 +31,11 @@ def dataset(tmpdir, request):
2931
kwargs = {}
3032

3133
if which.startswith("static"):
34+
project_root = pathlib.Path(zarr.__file__).resolve().parent.parent
3235
if which.endswith("nested"):
33-
return "fixture/nested"
36+
return str(project_root / "fixture/nested")
3437
else:
35-
return "fixture/flat"
38+
return str(project_root / "fixture/flat")
3639

3740
if which.startswith("directory"):
3841
store_class = DirectoryStore
@@ -60,7 +63,7 @@ def verify(array):
6063

6164

6265
def test_open(dataset):
63-
verify(zarr.open(dataset))
66+
verify(zarr.open(dataset, "r"))
6467

6568

6669
@pytest.mark.skipif(have_fsspec is False, reason="needs fsspec")

0 commit comments

Comments
 (0)