Skip to content

Commit

Permalink
test: fix aicsimageio test (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 authored Nov 13, 2023
1 parent ba78c7a commit 4eeea50
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/test_aicsimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import numpy as np
import pytest
from ome_types import OME

pytest.importorskip("aicsimageio")
from aicsimageio.readers.nd2_reader import ND2Reader # noqa
Expand All @@ -25,6 +26,7 @@
"expected_dims_order",
"expected_channel_names",
"expected_physical_pixel_sizes",
"expected_metadata_type",
),
[
pytest.param(
Expand All @@ -36,6 +38,7 @@
"TCYX",
["20phase", "20xDiO"],
(1, 50, 50),
dict,
),
(
"ND2_jonas_header_test2.nd2",
Expand All @@ -46,6 +49,7 @@
"CTZYX",
["Jonas_DIC"],
(0.5, 0.12863494437945, 0.12863494437945),
OME,
),
(
"ND2_maxime_BF007.nd2",
Expand All @@ -56,6 +60,7 @@
"CYX",
["405/488/561/633nm"],
(1.0, 0.158389678930686, 0.158389678930686),
OME,
),
(
"ND2_dims_p4z5t3c2y32x32.nd2",
Expand All @@ -66,6 +71,7 @@
"TZCYX",
["Widefield Green", "Widefield Red"],
(1.0, 0.652452890023035, 0.652452890023035),
OME,
),
(
"ND2_dims_c2y32x32.nd2",
Expand All @@ -76,6 +82,7 @@
"CYX",
["Widefield Green", "Widefield Red"],
(1.0, 0.652452890023035, 0.652452890023035),
OME,
),
(
"ND2_dims_p1z5t3c2y32x32.nd2",
Expand All @@ -86,6 +93,7 @@
"TZCYX",
["Widefield Green", "Widefield Red"],
(1.0, 0.652452890023035, 0.652452890023035),
OME,
),
(
"ND2_dims_p2z5t3-2c4y32x32.nd2",
Expand All @@ -96,6 +104,7 @@
"TZCYX",
["Widefield Green", "Widefield Red", "Widefield Far-Red", "Brightfield"],
(1.0, 0.652452890023035, 0.652452890023035),
OME,
),
(
"ND2_dims_t3c2y32x32.nd2",
Expand All @@ -106,6 +115,7 @@
"TCYX",
["Widefield Green", "Widefield Red"],
(1.0, 0.652452890023035, 0.652452890023035),
OME,
),
(
"ND2_dims_rgb_t3p2c2z3x64y64.nd2",
Expand All @@ -116,6 +126,7 @@
"TZCYXS",
["Brightfield", "Brightfield"],
(0.01, 0.34285714285714286, 0.34285714285714286),
OME,
),
(
"ND2_dims_rgb.nd2",
Expand All @@ -126,6 +137,7 @@
"CYXS",
["Brightfield"],
(1.0, 0.34285714285714286, 0.34285714285714286),
OME,
),
],
)
Expand All @@ -138,6 +150,7 @@ def test_nd2_reader(
expected_dims_order: str,
expected_channel_names: List[str],
expected_physical_pixel_sizes: Tuple[float, float, float],
expected_metadata_type: type,
) -> None:
if filename.startswith("ND2_"):
filename = filename[4:]
Expand All @@ -154,7 +167,7 @@ def test_nd2_reader(
expected_dims_order=expected_dims_order,
expected_channel_names=expected_channel_names,
expected_physical_pixel_sizes=expected_physical_pixel_sizes,
expected_metadata_type=dict,
expected_metadata_type=expected_metadata_type,
)


Expand Down

0 comments on commit 4eeea50

Please sign in to comment.