From fea025867184dfea03e69bc3c427e2882b107572 Mon Sep 17 00:00:00 2001 From: nialov Date: Fri, 15 Mar 2024 08:58:33 +0200 Subject: [PATCH] test(distance_to_anomaly): test criteria data check --- tests/raster_processing/test_distance_to_anomaly.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/raster_processing/test_distance_to_anomaly.py b/tests/raster_processing/test_distance_to_anomaly.py index eb033291..00adac8a 100644 --- a/tests/raster_processing/test_distance_to_anomaly.py +++ b/tests/raster_processing/test_distance_to_anomaly.py @@ -10,7 +10,7 @@ import rasterio.profiles from beartype.roar import BeartypeCallHintParamViolation -from eis_toolkit.exceptions import InvalidParameterValueException +from eis_toolkit.exceptions import EmptyDataException, InvalidParameterValueException from eis_toolkit.raster_processing import distance_to_anomaly from tests.raster_processing.clip_test import raster_path as SMALL_RASTER_PATH @@ -228,6 +228,15 @@ def test_distance_to_anomaly_gdal( partial(pytest.raises, BeartypeCallHintParamViolation), id="expected_invalid_param_due_to_tuple_of_length_three", ), + pytest.param( + SMALL_RASTER_PROFILE, + SMALL_RASTER_DATA, + (100.5, 122.5), + "in_between", + dict, + partial(pytest.raises, EmptyDataException), + id="expected_empty_data_due_to_threshold_range_outside_values", + ), ], ) def test_distance_to_anomaly_check(