Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed Oct 21, 2022
1 parent 61c27b5 commit f30a524
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cylc/flow/option_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,8 @@ def cleanup_sysargv(

# replace compound script name:
sys.argv[1] = script_name
sys.argv.append(workflow_id)
if workflow_id not in sys.argv:
sys.argv.append(workflow_id)


def log_subcommand(command, workflow_id):
Expand Down
4 changes: 2 additions & 2 deletions cylc/flow/scripts/validate_install_play.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@

CYLC_ROSE_OPTIONS = COP.get_cylc_rose_options()
VIP_OPTIONS = combine_options(
VALIDATE_OPTIONS, INSTALL_OPTIONS,
PLAY_OPTIONS, CYLC_ROSE_OPTIONS
('v', VALIDATE_OPTIONS), ('i', INSTALL_OPTIONS),
('p', PLAY_OPTIONS), ('cr', CYLC_ROSE_OPTIONS)
)


Expand Down
3 changes: 3 additions & 0 deletions tests/unit/test_option_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ def test_combine_options(inputs, expect):
'vip myworkflow'.split(),
{
'script_name': 'play',
'workflow_id': 'myworkflow',
'compound_script_opts': [
{ARGS: ['--foo', '-f'], KWARGS: {}},
],
Expand All @@ -238,6 +239,7 @@ def test_combine_options(inputs, expect):
'vip myworkflow'.split(),
{
'script_name': 'play',
'workflow_id': 'myworkflow',
'compound_script_opts': [
{ARGS: ['--foo', '-f'], KWARGS: {}},
{ARGS: ['--bar', '-b'], KWARGS: {}},
Expand All @@ -255,6 +257,7 @@ def test_combine_options(inputs, expect):
'vip myworkflow'.split(),
{
'script_name': 'play',
'workflow_id': 'myworkflow',
'compound_script_opts': [
{ARGS: ['--foo', '-f'], KWARGS: {}},
{ARGS: ['--bar', '-b'], KWARGS: {}},
Expand Down

0 comments on commit f30a524

Please sign in to comment.