diff --git a/iohub/ngff/nodes.py b/iohub/ngff/nodes.py index 6d63a8e0..2b51d3b6 100644 --- a/iohub/ngff/nodes.py +++ b/iohub/ngff/nodes.py @@ -193,7 +193,7 @@ def __delitem__(self, key): def __contains__(self, key): key = normalize_storage_path(key) - return key in self._member_names + return key.lower() in [name.lower() for name in self._member_names] def __iter__(self): yield from self._member_names diff --git a/tests/ngff/test_ngff.py b/tests/ngff/test_ngff.py index 50376a3a..62770d42 100644 --- a/tests/ngff/test_ngff.py +++ b/tests/ngff/test_ngff.py @@ -681,17 +681,18 @@ def test_position_scale(channels_and_random_5d): assert dataset.scale == scale +@pytest.mark.skip(reason="https://github.com/czbiohub-sf/iohub/issues/255") def test_combine_fovs_to_hcs(): fovs = {} fov_paths = ("A/1/0", "B/1/0", "H/12/9") - for path in fov_paths: - with open_ome_zarr(hcs_ref) as hcs_store: + with open_ome_zarr(hcs_ref) as hcs_store: + for path in fov_paths: fovs[path] = hcs_store["B/03/0"] with TemporaryDirectory() as temp_dir: store_path = os.path.join(temp_dir, "combined.zarr") - combined_plate = Plate.from_positions(store_path, fovs) + Plate.from_positions(store_path, fovs).close() # read data with an external reader - ext_reader = Reader(parse_url(combined_plate.zgroup.store.path)) + ext_reader = Reader(parse_url(store_path)) node = list(ext_reader())[0] plate_meta = node.metadata["metadata"]["plate"] assert len(plate_meta["rows"]) == 3 diff --git a/tests/ngff/test_ngff_utils.py b/tests/ngff/test_ngff_utils.py index a141ab5a..7cc0a5ca 100644 --- a/tests/ngff/test_ngff_utils.py +++ b/tests/ngff/test_ngff_utils.py @@ -498,7 +498,7 @@ def test_create_empty_plate(plate_setup, extra_channels): setup=apply_transform_czyx_setup(), constant=st.integers(min_value=1, max_value=5), ) -@settings(max_examples=5, deadline=1200) +@settings(max_examples=5, deadline=None) def test_apply_transform_to_zyx_and_save(setup, constant): ( position_keys, @@ -562,7 +562,7 @@ def test_apply_transform_to_zyx_and_save(setup, constant): constant=st.integers(min_value=1, max_value=3), num_processes=st.integers(min_value=1, max_value=3), ) -@settings(max_examples=3, deadline=2000) +@settings(max_examples=3, deadline=None) def test_process_single_position(setup, constant, num_processes): # def test_process_single_position(setup, constant, num_processes): (