From e076f881d73d16eb6f186105b3d3df4e6e501803 Mon Sep 17 00:00:00 2001 From: Hilary James Oliver Date: Mon, 4 Dec 2023 15:41:07 +1300 Subject: [PATCH] working on tui test... --- cylc/flow/task_pool.py | 7 +++++++ tests/integration/tui/test_app.py | 12 ++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/cylc/flow/task_pool.py b/cylc/flow/task_pool.py index 8bffc8b6350..f7caf5be87f 100644 --- a/cylc/flow/task_pool.py +++ b/cylc/flow/task_pool.py @@ -1720,6 +1720,13 @@ def _set_outputs_itask( # (note tasks states table gets updated from the task pool) self.workflow_db_mgr.put_update_task_state(itask) + # testing... + # self.data_store_mgr.delta_task_outputs(itask) + # self.data_store_mgr.delta_task_state(itask) + # self.data_store_mgr.update_data_structure() + # self.data_store_mgr.prune_data_store() + # self.data_store_mgr.update_updates_pending = True + def _set_prereqs_itask(self, itask, prereqs, flow_nums, flow_wait): """Set prerequisites on a task in the pool. diff --git a/tests/integration/tui/test_app.py b/tests/integration/tui/test_app.py index e6ed8c6e24d..5034521b1c3 100644 --- a/tests/integration/tui/test_app.py +++ b/tests/integration/tui/test_app.py @@ -19,6 +19,11 @@ import urwid from cylc.flow.cycling.integer import IntegerPoint +from cylc.flow.task_outputs import ( + TASK_OUTPUT_SUBMITTED, + TASK_OUTPUT_STARTED, + TASK_OUTPUT_SUCCEEDED +) from cylc.flow.task_state import ( # TASK_STATUS_RUNNING, TASK_STATUS_SUCCEEDED, @@ -332,9 +337,12 @@ async def test_auto_expansion(flow, scheduler, start, raikura): for task in ('a', 'b'): itask = schd.pool.get_task(IntegerPoint('1'), task) - itask.state_reset(TASK_STATUS_SUCCEEDED) - schd.pool.spawn_on_output(itask, TASK_STATUS_SUCCEEDED) + schd.pool._set_outputs_itask(itask, [TASK_OUTPUT_SUBMITTED]) + schd.pool._set_outputs_itask(itask, [TASK_OUTPUT_STARTED]) + schd.pool._set_outputs_itask(itask, [TASK_OUTPUT_SUCCEEDED]) + await schd.update_data_structure() + schd.update_data_store() rk.compare_screenshot( 'later-time',