Skip to content

Commit

Permalink
Allow tests to bypass automatic setting of [scheduler]allow implicit …
Browse files Browse the repository at this point in the history
…tasks = True
  • Loading branch information
wxtim committed Jan 15, 2024
1 parent 20c5272 commit 53cfeb7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/integration/scripts/test_validate_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def test_pre_cylc8(flow, validate, caplog):
'events': {'reset timer': 20}
}
}
})
}, defaults=False)
validate(id_)
for warning in (
(
Expand Down
15 changes: 13 additions & 2 deletions tests/integration/utils/flow_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,16 @@ def _make_flow(
conf: dict,
name: Optional[str] = None,
id_: Optional[str] = None,
defaults: Optional[bool] = True,
) -> str:
"""Construct a workflow on the filesystem."""
"""Construct a workflow on the filesystem.
Args:
defaults: Set up a common defaults.
* [scheduling]allow implicit tasks = true
Set false for Cylc 7 upgrader tests.
"""
if id_:
flow_run_dir = (cylc_run_dir / id_)
else:
Expand All @@ -74,7 +82,10 @@ def _make_flow(
.setdefault('default run length', 'PT0S')
)
# allow implicit tasks by default:
conf.setdefault('scheduler', {}).setdefault('allow implicit tasks', 'True')
if defaults:
conf.setdefault('scheduler', {}).setdefault(
'allow implicit tasks', 'True')

with open((flow_run_dir / WorkflowFiles.FLOW_FILE), 'w+') as flow_file:
flow_file.write(flow_config_str(conf))
return id_
Expand Down

0 comments on commit 53cfeb7

Please sign in to comment.