add simple CLI directly to package, related to #8

This commit was merged in pull request #9.
This commit is contained in:
2025-10-24 13:03:27 +02:00
parent 1920d01607
commit dd40440843
5 changed files with 51 additions and 8 deletions

View File

@@ -3,7 +3,7 @@ from unittest.mock import patch
import pytest
from dopt_sensor_anomalies import _csharp_interface, constants, errors
from dopt_sensor_anomalies import _interface, constants, errors
@patch("dopt_sensor_anomalies._find_paths.STOP_FOLDER_NAME", "lib")
@@ -15,7 +15,7 @@ def test_sensor_anomalies_detection_FailImagePath(setup_temp_dir):
MESSAGE = "The provided path seems not to exist"
with pytest.raises(FileNotFoundError, match=MESSAGE):
_csharp_interface.sensor_anomalies_detection(
_interface.sensor_anomalies_detection(
img_path, pixels_per_metric_X, pixels_per_metric_Y
)
@@ -29,7 +29,7 @@ def test_sensor_anomalies_detection_FailElectrodeCount(path_img_with_failure_Ele
MESSAGE = "Number of counted electrodes does not match the"
with pytest.raises(errors.InvalidElectrodeCount, match=MESSAGE):
_csharp_interface.sensor_anomalies_detection(
_interface.sensor_anomalies_detection(
img_path, pixels_per_metric_X, pixels_per_metric_Y
)
@@ -52,9 +52,7 @@ def test_sensor_anomalies_detection_Success(
pixels_per_metric_X: float = 0.251
pixels_per_metric_Y: float = 0.251
_csharp_interface.sensor_anomalies_detection(
img_path, pixels_per_metric_X, pixels_per_metric_Y
)
_interface.sensor_anomalies_detection(img_path, pixels_per_metric_X, pixels_per_metric_Y)
assert csv_file.exists()
assert heatmap_file.exists()