def test_use_event_slice_optimisation_when_using_event_slice_optimisation_is_checked(self): require_event_slices = True compatibility_mode = False event_slice_optimisation_checkbox = True actual_using_event_slice_optimisation, _ = select_reduction_alg(require_event_slices, compatibility_mode, event_slice_optimisation_checkbox, []) self.assertEqual(actual_using_event_slice_optimisation, True)
def test_does_not_use_event_slice_optimisation_when_optimisation_not_selected(self, event_slice_splitter_mock): require_event_slices = True compatibility_mode = False event_slice_optimisation_checkbox = False actual_using_event_slice_optimisation, _ = select_reduction_alg(require_event_slices, compatibility_mode, event_slice_optimisation_checkbox, []) self.assertEqual(actual_using_event_slice_optimisation, False) # Test that reduction packages have been split into event slices event_slice_splitter_mock.assert_called_once_with([])