Skip to content

Commit

Permalink
improving tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ashmeigh committed Jul 18, 2024
1 parent 13b78f5 commit 295bc61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mantidimaging/core/rotation/test/polyfit_correlation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -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__':
Expand Down

0 comments on commit 295bc61

Please sign in to comment.