12
12
13
13
14
14
@pytest .mark .parametrize (
15
- ("file_name" , "channel" , "pixel_to_nm_scaling" ),
16
- [pytest .param ("sample_0.ibw" , "HeightTracee" , 1.5625 , id = "test image 0" )],
15
+ ("file_name" , "channel" , "pixel_to_nm_scaling" , "image_shape" , "image_dtype" , "image_sum" ),
16
+ [pytest .param ("sample_0.ibw" , "HeightTracee" , 1.5625 , ( 512 , 512 ), "f4" , - 218091520.0 , id = "test image 0" )],
17
17
)
18
- def test_load_ibw (file_name : str , channel : str , pixel_to_nm_scaling : float ) -> None :
18
+ def test_load_ibw (
19
+ file_name : str ,
20
+ channel : str ,
21
+ pixel_to_nm_scaling : float ,
22
+ image_shape : tuple [int , int ],
23
+ image_dtype : type ,
24
+ image_sum : float ,
25
+ ) -> None :
19
26
"""Test the normal operation of loading an .ibw file."""
20
27
result_image = np .ndarray
21
28
result_pixel_to_nm_scaling = float
@@ -25,6 +32,6 @@ def test_load_ibw(file_name: str, channel: str, pixel_to_nm_scaling: float) -> N
25
32
26
33
assert result_pixel_to_nm_scaling == pixel_to_nm_scaling
27
34
assert isinstance (result_image , np .ndarray )
28
- assert result_image .shape == ( 512 , 512 )
29
- assert result_image .dtype == "f4"
30
- assert result_image .sum () == - 218091520.0
35
+ assert result_image .shape == image_shape
36
+ assert result_image .dtype == image_dtype
37
+ assert result_image .sum () == image_sum
0 commit comments