Skip to content

Commit

Permalink
working on tui test...
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Dec 4, 2023
1 parent 0d65a09 commit e076f88
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
7 changes: 7 additions & 0 deletions cylc/flow/task_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 10 additions & 2 deletions tests/integration/tui/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit e076f88

Please sign in to comment.