Commit 23fc38bc authored by Gemma Guest's avatar Gemma Guest
Browse files

Update unit tests to check the new history

Check for the new preprocess algorithm rather than the load algorithm
directly. Also we no longer have rename in the history because we are
only naming the algorithm at the last moment before putting it into the
ads with the correct name

Re #32125
parent eeddb3f1
......@@ -78,7 +78,7 @@ class ReflectometryISISLoadAndProcessTest(unittest.TestCase):
args['InputRunList'] = '13460'
outputs = ['IvsQ_13460', 'IvsQ_binned_13460', 'TOF_13460', 'TOF']
self._assert_run_algorithm_succeeds(args, outputs)
history = ['LoadNexus', 'ReflectometryReductionOneAuto', 'GroupWorkspaces']
history = ['ReflectometryISISPreprocess', 'ReflectometryReductionOneAuto', 'GroupWorkspaces']
self._check_history(AnalysisDataService.retrieve('IvsQ_binned_13460'), history)
def test_input_run_that_is_in_ADS_with_prefixed_name_is_not_reloaded(self):
......@@ -105,7 +105,7 @@ class ReflectometryISISLoadAndProcessTest(unittest.TestCase):
args['InputRunList'] = '13460'
outputs = ['IvsQ_13460', 'IvsQ_binned_13460', 'TEST_13460', 'TOF_13460', 'TOF']
self._assert_run_algorithm_succeeds(args, outputs)
history = ['LoadNexus', 'ReflectometryReductionOneAuto', 'GroupWorkspaces']
history = ['ReflectometryISISPreprocess', 'ReflectometryReductionOneAuto', 'GroupWorkspaces']
self._check_history(AnalysisDataService.retrieve('IvsQ_binned_13460'), history)
def test_existing_workspace_is_used_when_name_passed_in_input_list(self):
......@@ -122,7 +122,7 @@ class ReflectometryISISLoadAndProcessTest(unittest.TestCase):
args['InputRunList'] = 'INTER13460'
outputs = ['IvsQ_13460', 'IvsQ_binned_13460', 'TOF_13460', 'TOF']
self._assert_run_algorithm_succeeds(args, outputs)
history = ['LoadNexus', 'RenameWorkspace', 'ReflectometryReductionOneAuto', 'GroupWorkspaces']
history = ['ReflectometryISISPreprocess', 'ReflectometryReductionOneAuto', 'GroupWorkspaces']
self._check_history(AnalysisDataService.retrieve('IvsQ_binned_13460'), history)
def test_overriding_output_names(self):
......@@ -202,7 +202,7 @@ class ReflectometryISISLoadAndProcessTest(unittest.TestCase):
outputs = ['IvsQ_13460', 'IvsQ_binned_13460', 'TOF_13460', 'TRANS_13463', 'TRANS_13464',
'TRANS_LAM_13463_13464', 'TOF']
self._assert_run_algorithm_succeeds(args, outputs)
history = ['LoadNexus', 'LoadNexus', 'ReflectometryReductionOneAuto', 'GroupWorkspaces']
history = ['ReflectometryISISPreprocess', 'ReflectometryISISPreprocess', 'ReflectometryReductionOneAuto', 'GroupWorkspaces']
self._check_history(AnalysisDataService.retrieve('IvsQ_binned_13460'), history)
def test_trans_runs_are_not_loaded_if_in_ADS_without_prefix(self):
......@@ -234,7 +234,7 @@ class ReflectometryISISLoadAndProcessTest(unittest.TestCase):
outputs = ['IvsQ_13460', 'IvsQ_binned_13460', 'TOF_13460', 'TRANS_13463', 'TRANS_13464',
'TEST_13463', 'TEST_13464', 'TRANS_LAM_13463_13464', 'TOF']
self._assert_run_algorithm_succeeds(args, outputs)
history = ['LoadNexus', 'LoadNexus', 'ReflectometryReductionOneAuto', 'GroupWorkspaces']
history = ['ReflectometryISISPreprocess', 'ReflectometryISISPreprocess', 'ReflectometryReductionOneAuto', 'GroupWorkspaces']
self._check_history(AnalysisDataService.retrieve('IvsQ_binned_13460'), history)
def test_existing_workspace_is_used_for_trans_runs_when_name_passed_in_input_list(self):
......@@ -557,7 +557,6 @@ class ReflectometryISISLoadAndProcessTest(unittest.TestCase):
checks the top level history (the latter is required for sliced workspaces where
the child workspaces have lost their parent's history)
"""
return True
history = ws.getHistory()
if unroll:
reductionHistory = history.getAlgorithmHistory(history.size() - 1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment