Skip to content

Commit 6ddb9bd

Browse files
committed
Don't use relative fixture path
see: zarr-developers#1312 see: zarr-developers#1347 see: zarr-developers#1348
1 parent eacda8d commit 6ddb9bd

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

zarr/tests/test_attrs.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,18 @@ def test_storage(self, zarr_version):
5353
def test_utf8_encoding(self, zarr_version):
5454

5555
project_root = pathlib.Path(zarr.__file__).resolve().parent.parent
56-
fixdir = project_root / "fixture" / "utf8attrs"
57-
if not fixdir.exists(): # pragma: no cover
56+
fixdir = project_root / "fixture"
57+
testdir = fixdir / "utf8attrs"
58+
if not testdir.exists(): # pragma: no cover
5859
# store the data - should be one-time operation
59-
fixdir.mkdir()
60-
with (fixdir / ".zattrs").open("w", encoding="utf-8") as f:
60+
testdir.mkdir()
61+
with (testdir / ".zattrs").open("w", encoding="utf-8") as f:
6162
f.write('{"foo": "た"}')
62-
with (fixdir / ".zgroup").open("w", encoding="utf-8") as f:
63+
with (testdir / ".zgroup").open("w", encoding="utf-8") as f:
6364
f.write("""{\n "zarr_format": 2\n}""")
6465

6566
# fixture data
66-
fixture = group(store=DirectoryStore('fixture'))
67+
fixture = group(store=DirectoryStore(str(fixdir)))
6768
assert fixture['utf8attrs'].attrs.asdict() == dict(foo='た')
6869

6970
def test_get_set_del_contains(self, zarr_version):

0 commit comments

Comments
 (0)