Skip to content

Commit 0d4633c

Browse files
committed
Fix parametrization
1 parent 578c2fc commit 0d4633c

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

tests/test_spm.py

+15-6
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,21 @@
1212

1313

1414
@pytest.mark.parametrize(
15-
("file_name", "channel", "pixel_to_nm_scaling"),
15+
("file_name", "channel", "pixel_to_nm_scaling", "image_shape", "image_dtype", "image_sum"),
1616
[
17-
pytest.param("sample_0.spm", "Height", 0.4940029296875, id="file type 0"),
17+
pytest.param(
18+
"sample_0.spm", "Height", 0.4940029296875, (1024, 1024), np.float64, 30695369.188316286, id="file type 0"
19+
),
1820
],
1921
)
20-
def test_load_spm(file_name: str, channel: str, pixel_to_nm_scaling: float) -> None:
22+
def test_load_spm(
23+
file_name: str,
24+
channel: str,
25+
pixel_to_nm_scaling: float,
26+
image_shape: tuple[int, int],
27+
image_dtype: type,
28+
image_sum: float,
29+
) -> None:
2130
"""Test the normal operation of loading a .spm file."""
2231
result_image = np.ndarray
2332
result_pixel_to_nm_scaling = float
@@ -27,6 +36,6 @@ def test_load_spm(file_name: str, channel: str, pixel_to_nm_scaling: float) -> N
2736

2837
assert result_pixel_to_nm_scaling == pixel_to_nm_scaling
2938
assert isinstance(result_image, np.ndarray)
30-
assert result_image.shape == (1024, 1024)
31-
assert result_image.dtype == np.float64
32-
assert result_image.sum() == 30695369.188316286
39+
assert result_image.shape == image_shape
40+
assert result_image.dtype == image_dtype
41+
assert result_image.sum() == image_sum

0 commit comments

Comments
 (0)