Skip to content

Commit

Permalink
Test for missing variable value
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrost-mo committed Dec 19, 2023
1 parent b73063a commit 7b1bc09
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,12 @@ def test_parse_variable_options():
expected = {"STASH": "m01s01i001", "COUNT": 3, "CELL_METHODS": []}
actual = common.parse_variable_options(args)
assert actual == expected
invalid_args = ("--lowercase=False",)
# Not valid variable name.
with pytest.raises(ValueError):
common.parse_variable_options(invalid_args)
common.parse_variable_options(("--lowercase=False",))
# Missing variable value.
with pytest.raises(ValueError):
common.parse_variable_options(("--VARIABLE",))


def test_template_variables():
Expand Down

0 comments on commit 7b1bc09

Please sign in to comment.