Skip to content

Commit

Permalink
test case sensitivity
Browse files Browse the repository at this point in the history
  • Loading branch information
talonchandler committed Oct 2, 2024
1 parent 1848a91 commit 53f42a1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tests/ngff/test_ngff.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from numpy.typing import NDArray
from ome_zarr.io import parse_url
from ome_zarr.reader import Reader
from zarr.errors import ContainsGroupError

if TYPE_CHECKING:
from _typeshed import StrPath
Expand Down Expand Up @@ -630,7 +631,6 @@ def test_modify_hcs_ref(row: str, col: str, pos: str):
new_pos.create_zeros("0", position[0].shape, position[0].dtype)
assert not dataset[f"{new_pos_path}/0"][:].any()


@given(row_names=plate_axis_names_st, col_names=plate_axis_names_st)
@settings(max_examples=16, deadline=2000)
def test_create_well(row_names: list[str], col_names: list[str]):
Expand Down Expand Up @@ -667,6 +667,20 @@ def test_create_position(row, col, pos):
assert os.path.isdir(os.path.join(store_path, row, col, pos))
assert dataset[row][col].metadata.images[0].path == pos

def test_create_position_case_sensitivity(row, col, pos):
"""Test `iohub.ngff.Plate.create_position()`"""
with TemporaryDirectory() as temp_dir:
store_path = os.path.join(temp_dir, "hcs.zarr")
dataset = open_ome_zarr(
store_path, layout="hcs", mode="a", channel_names=["GFP"]
)
dataset.create_position("S", "0", "1")
dataset.create_position("s", "1", "0")

with pytest.raises(ContainsGroupError):
dataset.create_position("S", "1", "0")



@given(channels_and_random_5d=_channels_and_random_5d())
def test_position_scale(channels_and_random_5d):
Expand Down

0 comments on commit 53f42a1

Please sign in to comment.