Skip to content

Commit f5eb9de

Browse files
committed
Fix parametrization
1 parent 8ba1248 commit f5eb9de

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

tests/test_ibw.py

+13-6
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,17 @@
1212

1313

1414
@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")],
1717
)
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:
1926
"""Test the normal operation of loading an .ibw file."""
2027
result_image = np.ndarray
2128
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
2532

2633
assert result_pixel_to_nm_scaling == pixel_to_nm_scaling
2734
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

Comments
 (0)