From bd318382e6a2285076a504c0c71c6d1a9d073905 Mon Sep 17 00:00:00 2001 From: Farid Yagubbayli Date: Thu, 19 Oct 2023 20:46:13 +0200 Subject: [PATCH] Test nearest neighbor mode of resize function (#216) --- .../matlab_collectors/collect_resize.m | 5 +---- .../python_testers/test_resize.py | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/matlab_test_data_collectors/matlab_collectors/collect_resize.m b/tests/matlab_test_data_collectors/matlab_collectors/collect_resize.m index 73e5ae61..73eb3cd9 100644 --- a/tests/matlab_test_data_collectors/matlab_collectors/collect_resize.m +++ b/tests/matlab_test_data_collectors/matlab_collectors/collect_resize.m @@ -3,9 +3,7 @@ output_file = 'collectedValues/resize.mat'; recorder = utils.TestRecorder(output_file); -% TODO: test also for nearest -% interp_methods = {'nearest', 'linear'}; -interp_methods = {'linear'}; +interp_methods = {'nearest', 'linear'}; % Generate a random 3D volume with dimensions Nx x Ny x Nz Nx = randi([10,20]); @@ -30,4 +28,3 @@ end recorder.saveRecordsToDisk(); - diff --git a/tests/matlab_test_data_collectors/python_testers/test_resize.py b/tests/matlab_test_data_collectors/python_testers/test_resize.py index b95bbbae..422f5098 100644 --- a/tests/matlab_test_data_collectors/python_testers/test_resize.py +++ b/tests/matlab_test_data_collectors/python_testers/test_resize.py @@ -22,5 +22,6 @@ def test_resize(): assert np.allclose(expected_resized_volume, resized_volume), f"Results do not match for {i + 1} dimensional case." + reader.increment() - logging.log(logging.INFO, 'revolve2d(..) works as expected!') + logging.log(logging.INFO, 'resize(..) works as expected!')