From 060a20aea3e08ef9de32f2b79c89afe68a4c4347 Mon Sep 17 00:00:00 2001 From: Tim Pillinger <26465611+wxtim@users.noreply.github.com> Date: Fri, 17 Jan 2025 08:11:18 +0000 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Oliver Sanders --- cylc/flow/scripts/show.py | 3 ++- tests/integration/scripts/test_show.py | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cylc/flow/scripts/show.py b/cylc/flow/scripts/show.py index 248fb63255..01fa20da2d 100755 --- a/cylc/flow/scripts/show.py +++ b/cylc/flow/scripts/show.py @@ -52,6 +52,7 @@ from cylc.flow.id import Tokens from cylc.flow.id_cli import parse_ids from cylc.flow.network.client_factory import get_client +from cylc.flow.run_modes import RunMode from cylc.flow.task_outputs import TaskOutputs from cylc.flow.task_state import ( TASK_STATUSES_ORDERED, @@ -349,7 +350,7 @@ async def prereqs_and_outputs_query( attrs.append("runahead") if ( t_proxy['runtime']['runMode'] - and t_proxy['runtime']['runMode'] != 'Live' + and t_proxy['runtime']['runMode'] != RunMode.LIVE.value ): attrs.append(f"run mode={t_proxy['runtime']['runMode']}") state_msg = state diff --git a/tests/integration/scripts/test_show.py b/tests/integration/scripts/test_show.py index 3ea1b83ece..7c9befbacc 100644 --- a/tests/integration/scripts/test_show.py +++ b/tests/integration/scripts/test_show.py @@ -289,7 +289,7 @@ async def test_task_instance_state_flows( ] -async def test_mode_changes(flow, scheduler, start, capsys): +async def test_task_run_mode_changes(flow, scheduler, start, capsys): """Broadcasting a change of run mode changes run mode shown by cylc show. """ opts = SimpleNamespace( @@ -300,7 +300,6 @@ async def test_mode_changes(flow, scheduler, start, capsys): ) schd = scheduler( flow({'scheduling': {'graph': {'R1': 'a'}}}), - paused_start=True, run_mode='live' )