Skip to content

Commit

Permalink
per #511, add unit test for expected behavior to support comma-separa…
Browse files Browse the repository at this point in the history
…ted lists in a command line single config override that should fail until fix is made
  • Loading branch information
georgemccabe committed Dec 6, 2024
1 parent 42355aa commit 043dd61
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/tests/pytests/run_metplus/test_run_metplus.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
NEW_OUTPUT_BASE = os.path.join(TEST_OUTPUT_DIR, 'run_metplus')
OUTPUT_BASE_OVERRIDE = f"config.OUTPUT_BASE={NEW_OUTPUT_BASE}"

# test that a list of values specified in a command line config override
# will no longer cause an error in the run. The list can be specified without
# quotes if no spaces are present or with quotes if spaces are present
LIST_CONFIG_OVERRIDE_1 = 'config.LEAD_SEQ=3H,6H'
LIST_CONFIG_OVERRIDE_2 = 'config.LEAD_SEQ="3H, 6H"'

@pytest.mark.run_metplus
def test_run_metplus_exists():
"""! Check that run_metplus.py script exists """
Expand All @@ -31,6 +37,8 @@ def test_run_metplus_exists():
([RUN_METPLUS], 2),
([RUN_METPLUS, EXAMPLE_CONF], 2),
([RUN_METPLUS, EXAMPLE_CONF, MINIMUM_CONF, OUTPUT_BASE_OVERRIDE], 0),
([RUN_METPLUS, EXAMPLE_CONF, MINIMUM_CONF, LIST_CONFIG_OVERRIDE_1], 0),
([RUN_METPLUS, EXAMPLE_CONF, MINIMUM_CONF, LIST_CONFIG_OVERRIDE_2], 0),
]
)
@pytest.mark.run_metplus
Expand Down

0 comments on commit 043dd61

Please sign in to comment.