Skip to content

Commit

Permalink
live viewer eyes test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeSullivan7 committed Nov 19, 2024
1 parent 5a699ba commit d7d37ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mantidimaging/eyes_tests/live_viewer_window_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def _make_simple_dir(self, directory: Path):
@mock.patch("time.time", return_value=4000.0)
def test_live_view_opens_without_data(self, _mock_time, _mock_image_watcher):
self.imaging.show_live_viewer(self.live_directory)
self.check_target(widget=self.imaging.live_viewer)
self.check_target(widget=self.imaging.live_viewer_list[-1])

@mock.patch('mantidimaging.gui.windows.live_viewer.presenter.LiveViewerWindowPresenter.load_image')
@mock.patch('mantidimaging.gui.windows.live_viewer.model.ImageWatcher')
Expand All @@ -65,7 +65,7 @@ def test_live_view_opens_with_data(self, _mock_time, _mock_image_watcher, mock_l
mock_load_image.return_value = self._generate_image()
self.imaging.show_live_viewer(self.live_directory)
self.imaging.live_viewer.presenter.model._handle_image_changed_in_list(image_list)
self.check_target(widget=self.imaging.live_viewer)
self.check_target(widget=self.imaging.live_viewer_list[-1])

@mock.patch('mantidimaging.gui.windows.live_viewer.presenter.LiveViewerWindowPresenter.load_image')
@mock.patch('mantidimaging.gui.windows.live_viewer.model.ImageWatcher')
Expand All @@ -76,7 +76,7 @@ def test_live_view_opens_with_bad_data(self, _mock_time, _mock_image_watcher, mo
mock_load_image.side_effect = ValueError
self.imaging.show_live_viewer(self.live_directory)
self.imaging.live_viewer.presenter.model._handle_image_changed_in_list(image_list)
self.check_target(widget=self.imaging.live_viewer)
self.check_target(widget=self.imaging.live_viewer_list[-1])

@mock.patch('mantidimaging.gui.windows.live_viewer.presenter.LiveViewerWindowPresenter.load_image')
@mock.patch('mantidimaging.gui.windows.live_viewer.model.ImageWatcher')
Expand All @@ -88,4 +88,4 @@ def test_rotate_operation_rotates_image(self, _mock_time, _mock_image_watcher, m
self.imaging.show_live_viewer(self.live_directory)
self.imaging.live_viewer.presenter.model._handle_image_changed_in_list(image_list)
self.imaging.live_viewer.rotate_angles_group.actions()[1].trigger()
self.check_target(widget=self.imaging.live_viewer)
self.check_target(widget=self.imaging.live_viewer_list[-1])

0 comments on commit d7d37ae

Please sign in to comment.