3131 "expected_dtype, "
3232 "expected_dims_order, "
3333 "expected_channel_names, "
34- "expected_physical_pixel_sizes" ,
34+ "expected_physical_pixel_sizes, "
35+ "expected_metadata_type" ,
3536 [
3637 pytest .param (
3738 "example.txt" ,
4243 None ,
4344 None ,
4445 None ,
46+ None ,
4547 marks = pytest .mark .xfail (raises = exceptions .UnsupportedFileFormatError ),
4648 ),
4749 pytest .param (
5355 "TCYX" ,
5456 ["20phase" , "20xDiO" ],
5557 (1 , 50 , 50 ),
58+ dict ,
5659 ),
5760 (
5861 "ND2_jonas_header_test2.nd2" ,
6366 "CTZYX" ,
6467 ["Jonas_DIC" ],
6568 (0.5 , 0.12863494437945 , 0.12863494437945 ),
69+ OME ,
6670 ),
6771 (
6872 "ND2_maxime_BF007.nd2" ,
7377 "CYX" ,
7478 ["405/488/561/633nm" ],
7579 (1.0 , 0.158389678930686 , 0.158389678930686 ),
80+ OME ,
7681 ),
7782 (
7883 "ND2_dims_p4z5t3c2y32x32.nd2" ,
8388 "TZCYX" ,
8489 ["Widefield Green" , "Widefield Red" ],
8590 (1.0 , 0.652452890023035 , 0.652452890023035 ),
91+ OME ,
8692 ),
8793 (
8894 "ND2_dims_c2y32x32.nd2" ,
9399 "CYX" ,
94100 ["Widefield Green" , "Widefield Red" ],
95101 (1.0 , 0.652452890023035 , 0.652452890023035 ),
102+ OME ,
96103 ),
97104 (
98105 "ND2_dims_p1z5t3c2y32x32.nd2" ,
103110 "TZCYX" ,
104111 ["Widefield Green" , "Widefield Red" ],
105112 (1.0 , 0.652452890023035 , 0.652452890023035 ),
113+ OME ,
106114 ),
107115 (
108116 "ND2_dims_p2z5t3-2c4y32x32.nd2" ,
113121 "TZCYX" ,
114122 ["Widefield Green" , "Widefield Red" , "Widefield Far-Red" , "Brightfield" ],
115123 (1.0 , 0.652452890023035 , 0.652452890023035 ),
124+ OME ,
116125 ),
117126 (
118127 "ND2_dims_t3c2y32x32.nd2" ,
123132 "TCYX" ,
124133 ["Widefield Green" , "Widefield Red" ],
125134 (1.0 , 0.652452890023035 , 0.652452890023035 ),
135+ OME ,
126136 ),
127137 (
128138 "ND2_dims_rgb_t3p2c2z3x64y64.nd2" ,
133143 "TZCYXS" ,
134144 ["Brightfield" , "Brightfield" ],
135145 (0.01 , 0.34285714285714286 , 0.34285714285714286 ),
146+ OME ,
136147 ),
137148 (
138149 "ND2_dims_rgb.nd2" ,
143154 "CYXS" ,
144155 ["Brightfield" ],
145156 (1.0 , 0.34285714285714286 , 0.34285714285714286 ),
157+ OME ,
146158 ),
147159 ],
148160)
@@ -156,6 +168,7 @@ def test_nd2_reader(
156168 expected_dims_order : str ,
157169 expected_channel_names : List [str ],
158170 expected_physical_pixel_sizes : Tuple [float , float , float ],
171+ expected_metadata_type : Union [type , Tuple [Union [type , Tuple [Any , ...]], ...]],
159172) -> None :
160173 # Construct full filepath
161174 uri = get_resource_full_path (filename , host )
@@ -172,7 +185,7 @@ def test_nd2_reader(
172185 expected_dims_order = expected_dims_order ,
173186 expected_channel_names = expected_channel_names ,
174187 expected_physical_pixel_sizes = expected_physical_pixel_sizes ,
175- expected_metadata_type = dict ,
188+ expected_metadata_type = expected_metadata_type ,
176189 )
177190
178191
@@ -196,7 +209,7 @@ def test_nd2_reader(
196209 dimensions .DEFAULT_DIMENSION_ORDER ,
197210 ["Jonas_DIC" ],
198211 (0.5 , 0.12863494437945 , 0.12863494437945 ),
199- dict ,
212+ OME ,
200213 ),
201214 ],
202215)
0 commit comments