diff --git a/cylc/flow/config.py b/cylc/flow/config.py index 1e763a65bc..d2e5fbae76 100644 --- a/cylc/flow/config.py +++ b/cylc/flow/config.py @@ -2258,7 +2258,6 @@ def load_graph(self): task_output_opt=task_output_opt ) parser.parse_graph(graph) - self.check_outputs(parser.task_output_opt.keys()) task_output_opt.update(parser.task_output_opt) self.workflow_polling_tasks.update( parser.workflow_state_polling_tasks) @@ -2285,11 +2284,10 @@ def check_outputs(self, tasks_and_ouputs): safe """ for task, output in tasks_and_ouputs: - try: registered_outputs = self.cfg['runtime'][task]['outputs'] except KeyError: - pass + registered_outputs = [] if ( not TaskOutputs.is_valid_std_name(output) and output not in registered_outputs diff --git a/tests/integration/test_optional_outputs.py b/tests/integration/test_optional_outputs.py index da4ff989b3..8fb08784ae 100644 --- a/tests/integration/test_optional_outputs.py +++ b/tests/integration/test_optional_outputs.py @@ -288,14 +288,11 @@ def implicit_completion_config(mod_flow, mod_validate): }, 'runtime': { 'root': { - 'outputs': { - 'x': 'xxx', - 'y': 'yyy', - 'z': 'zzz', - } + 'outputs': {n: f'{n}{n}{n}' for n in 'abcdefghijklxyz'} } } }) + return mod_validate(id_) @@ -322,6 +319,7 @@ async def test_implicit_completion_expression( implicit_completion_config, task, condition, + monkeypatch, ): """It should generate a completion expression from the graph. @@ -329,6 +327,7 @@ async def test_implicit_completion_expression( should auto generate one inferring whether outputs are required or not from the graph. """ + # monkeypatch.setattr('cylc.flow.config.WorkflowConfig.check_outputs', lambda *_: None) completion_expression = get_completion_expression( implicit_completion_config.taskdefs[task] )