Skip to content

Commit

Permalink
style(tests): Typehints for remaining tests
Browse files Browse the repository at this point in the history
  • Loading branch information
slackline committed Jan 7, 2025
1 parent 4aa3447 commit 3d10c16
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/test_ibw.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_load_ibw(
result_pixel_to_nm_scaling = float

file_path = RESOURCES / file_name
result_image, result_pixel_to_nm_scaling = load_ibw(file_path, channel)
result_image, result_pixel_to_nm_scaling = load_ibw(file_path, channel) # type: ignore

assert result_pixel_to_nm_scaling == pixel_to_nm_scaling
assert isinstance(result_image, np.ndarray)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_jpk.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_load_jpk(
result_pixel_to_nm_scaling = float

file_path = RESOURCES / file_name
result_image, result_pixel_to_nm_scaling = load_jpk(file_path, channel)
result_image, result_pixel_to_nm_scaling = load_jpk(file_path, channel) # type: ignore

assert result_pixel_to_nm_scaling == pixel_to_nm_scaling
assert isinstance(result_image, np.ndarray)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_spm.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Test the loading of spm files."""

from pathlib import Path
from unittest.mock import patch
from unittest.mock import patch, MagicMock

import numpy as np
import pySPM
Expand Down Expand Up @@ -58,7 +58,7 @@ def test_load_spm(
],
)
def test__spm_pixel_to_nm_scaling(
mock_pxs,
mock_pxs: "MagicMock",
spm_channel_data: pySPM.SPM.SPM_image,
filename: str,
unit: str,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_topostats.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ def test_load_topostats(
assert result_pixel_to_nm_scaling == pixel_to_nm_scaling
assert isinstance(result_image, np.ndarray)
assert result_image.shape == image_shape
assert set(result_data.keys()) == data_keys
assert set(result_data.keys()) == data_keys # type: ignore
assert result_data["topostats_file_version"] == topostats_file_version
assert result_image.sum() == image_sum

0 comments on commit 3d10c16

Please sign in to comment.