Skip to content

Commit

Permalink
Response to review
Browse files Browse the repository at this point in the history
Co-authored-by: Ronnie Dutta <[email protected]>
  • Loading branch information
wxtim and MetRonnie committed Nov 15, 2024
1 parent 60a75b3 commit 9855cd3
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 5 deletions.
1 change: 0 additions & 1 deletion tests/integration/run_modes/test_mode_overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ async def test_run_mode_override_from_config(
},
},
'runtime': {
'root': {'simulation': {'default run length': 'PT0S'}},
'live': {'run mode': 'live'},
'skip': {'run mode': 'skip'},
}
Expand Down
4 changes: 3 additions & 1 deletion tests/integration/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,9 @@ def test_skip_forbidden_as_output(flow, validate):
'scheduling': {'graph': {'R1': 'task'}},
'runtime': {'task': {'outputs': {'skip': 'message for skip'}}}
})
with pytest.raises(WorkflowConfigError, match='message for skip'):
with pytest.raises(
WorkflowConfigError, match='Invalid task output .* cannot be: `skip`'
):
validate(wid)


Expand Down
3 changes: 0 additions & 3 deletions tests/integration/test_task_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1591,9 +1591,6 @@ async def test_set_outputs_from_skip_settings(
"""
id_ = flow(
{
'scheduler': {
'allow implicit tasks': 'True',
},
'scheduling': {
'cycling mode': 'integer',
'initial cycle point': 1,
Expand Down
25 changes: 25 additions & 0 deletions tests/unit/run_modes/test__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & Contributors.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Tests for utilities supporting run modes.
"""

from cylc.flow.run_modes import RunMode


def test_run_mode_desc():
"""All run mode labels have descriptions."""
for mode in RunMode:
assert mode.describe()

0 comments on commit 9855cd3

Please sign in to comment.