Skip to content

Commit

Permalink
Init tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DolicaAkelloEgwel committed Nov 30, 2020
1 parent 8276080 commit bdda70e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion mantidimaging/gui/dialogs/cor_inspection/test/model_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,21 @@ def test_adjust_cor(self):
self.assertEqual(m.centre_value, 4.75)
self.assertEqual(m.step, 0.125)

def test_iters_mode(self):
def test_iters_mode_init(self):
images = generate_images()
m = CORInspectionDialogModel(images, 5, ScalarCoR(20), ReconstructionParameters('FBP_CUDA', 'ram-lak'), True)

self.assertEqual(m.centre_value, INIT_ITERS_CENTRE_VALUE)
self.assertEqual(m.step, INIT_ITERS_STEP)
self.assertEqual(m._recon_preview, m._recon_iters_preview)
self.assertEqual(m._divide_step, m._divide_iters_step)

def test_cor_mode_init(self):
images = generate_images()
initial_cor = ScalarCoR(20)
m = CORInspectionDialogModel(images, 5, initial_cor, ReconstructionParameters('FBP_CUDA', 'ram-lak'), False)

self.assertEqual(m.centre_value, initial_cor.value)
self.assertEqual(m.step, images.width * 0.05)
self.assertEqual(m._recon_preview, m._recon_cor_preview)
self.assertEqual(m._divide_step, m._divide_cor_step)

0 comments on commit bdda70e

Please sign in to comment.