From 295bc6128cc6f3cdbc8de7c3afecb44c4dd055ab Mon Sep 17 00:00:00 2001 From: ashmeigh Date: Thu, 18 Jul 2024 12:54:36 +0100 Subject: [PATCH] improving tests --- .../core/rotation/test/polyfit_correlation_test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mantidimaging/core/rotation/test/polyfit_correlation_test.py b/mantidimaging/core/rotation/test/polyfit_correlation_test.py index be567161b3f..10143bc767e 100644 --- a/mantidimaging/core/rotation/test/polyfit_correlation_test.py +++ b/mantidimaging/core/rotation/test/polyfit_correlation_test.py @@ -6,7 +6,7 @@ import numpy as np from mantidimaging.test_helpers.start_qapplication import start_multiprocessing_pool -from mantidimaging.test_helpers.unit_test_helper import generate_images, assert_not_equals +from mantidimaging.test_helpers.unit_test_helper import generate_images from ..polyfit_correlation import do_calculate_correlation_err, get_search_range, find_center, _find_shift from ...data import ImageStack from ...utility.progress_reporting import Progress @@ -51,7 +51,7 @@ def test_find_shift(self): shift = np.zeros(images.height) _find_shift(images, search_range, min_correlation_error, shift) # check that the shift has been changed - assert_not_equals(shift, np.zeros((images.height, ))) + self.assertNotEqual(shift.tolist(), np.zeros((images.height, )).tolist(), "Shift array should not be all zeros") def test_find_shift_multiple_argmin(self): rng = np.random.default_rng() @@ -62,7 +62,7 @@ def test_find_shift_multiple_argmin(self): shift = np.zeros((images.height, )) _find_shift(images, search_range, min_correlation_error, shift) # check that the shift has been changed - assert_not_equals(shift, np.zeros((images.height, ))) + self.assertNotEqual(shift.tolist(), np.zeros((images.height, )).tolist(), "Shift array should not be all zeros") if __name__ == '__main__':