11
11
import numpy as np
12
12
from PyQt5 .QtWidgets import QDialog
13
13
14
- from mantidimaging .core .data .dataset import StrictDataset , MixedDataset
14
+ from mantidimaging .core .data .dataset import StrictDataset , MixedDataset , Dataset
15
15
from mantidimaging .core .utility .data_containers import ProjectionAngles
16
16
from mantidimaging .gui .windows .main import MainWindowView
17
17
from mantidimaging .gui .windows .main .presenter import Notification as PresNotification , Notification
@@ -200,24 +200,18 @@ def test_load_projection_angles(self, getOpenFileName: mock.Mock, DatasetSelecto
200
200
QMessageBox .information .assert_called_once ()
201
201
202
202
def test_update_shortcuts_with_presenter_with_one_or_more_stacks (self ):
203
- self .presenter .datasets = [StrictDataset ( sample = mock . Mock ()), MixedDataset ()]
203
+ self .presenter .datasets = [Dataset ()]
204
204
205
- self ._update_shortcuts_test (False , True , True )
206
- self ._update_shortcuts_test (True , True , True )
207
-
208
- def test_update_shortcuts_with_presenter_with_no_strict_datasets (self ):
209
- self .presenter .datasets = [MixedDataset (), MixedDataset ()]
210
-
211
- self ._update_shortcuts_test (False , True , False )
212
- self ._update_shortcuts_test (True , True , False )
205
+ self ._update_shortcuts_test (False , True )
206
+ self ._update_shortcuts_test (True , True )
213
207
214
208
def test_update_shortcuts_with_presenter_with_no_stacks (self ):
215
209
self .presenter .datasets = []
216
210
217
- self ._update_shortcuts_test (False , False , False )
218
- self ._update_shortcuts_test (True , False , False )
211
+ self ._update_shortcuts_test (False , False )
212
+ self ._update_shortcuts_test (True , False )
219
213
220
- def _update_shortcuts_test (self , original_state , has_stacks , has_strict_datasets ):
214
+ def _update_shortcuts_test (self , original_state , has_stacks ):
221
215
self .view .actionSaveImages .setEnabled (original_state )
222
216
self .view .actionSampleLoadLog .setEnabled (original_state )
223
217
self .view .actionLoad180deg .setEnabled (original_state )
@@ -229,7 +223,7 @@ def _update_shortcuts_test(self, original_state, has_stacks, has_strict_datasets
229
223
230
224
self .assertEqual (has_stacks , self .view .actionSaveImages .isEnabled ())
231
225
self .assertEqual (has_stacks , self .view .actionSampleLoadLog .isEnabled ())
232
- self .assertEqual (has_strict_datasets , self .view .actionLoad180deg .isEnabled ())
226
+ self .assertEqual (has_stacks , self .view .actionLoad180deg .isEnabled ())
233
227
self .assertEqual (has_stacks , self .view .actionLoadProjectionAngles .isEnabled ())
234
228
self .assertEqual (has_stacks , self .view .menuWorkflow .isEnabled ())
235
229
self .assertEqual (has_stacks , self .view .menuImage .isEnabled ())
0 commit comments