Skip to content

Commit 83a91c9

Browse files
committed
cleanuip
1 parent d740c7a commit 83a91c9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/zarr/testing/stateful.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525

2626
MAX_BINARY_SIZE = 100
2727

28-
# Handle possible case-insensitive file systems (e.g. MacOS)
29-
node_names = node_names.map(lambda x: x.lower())
30-
3128

3229
def split_prefix_name(path: str) -> tuple[str, str]:
3330
split = path.rsplit("/", maxsplit=1)
@@ -71,6 +68,9 @@ def can_add(self, path: str) -> bool:
7168
# -------------------- store operations -----------------------
7269
@rule(name=node_names, data=st.data())
7370
def add_group(self, name: str, data: DataObject) -> None:
71+
# Handle possible case-insensitive file systems (e.g. MacOS)
72+
if isinstance(self.store, LocalStore):
73+
name = name.lower()
7474
if self.all_groups:
7575
parent = data.draw(st.sampled_from(sorted(self.all_groups)), label="Group parent")
7676
else:
@@ -93,6 +93,9 @@ def add_array(
9393
name: str,
9494
array_and_chunks: tuple[np.ndarray[Any, Any], tuple[int, ...]],
9595
) -> None:
96+
# Handle possible case-insensitive file systems (e.g. MacOS)
97+
if isinstance(self.store, LocalStore):
98+
name = name.lower()
9699
array, chunks = array_and_chunks
97100
fill_value = data.draw(npst.from_dtype(array.dtype))
98101
if self.all_groups:

0 commit comments

Comments
 (0)