Skip to content

Commit

Permalink
add test for multiple paths (bad)
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagowfx authored and cblakkan committed Dec 28, 2024
1 parent ef9fe05 commit f459716
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions yamale/tests/test_command_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ def test_multiple_paths_good_yaml():
], "schema.yaml", 1, "PyYAML")


def test_multiple_paths_bad_yaml():
with pytest.raises(ValueError) as e:
command_line._router([
"yamale/tests/command_line_fixtures/yamls/bad.yaml",
"yamale/tests/command_line_fixtures/yamls/required_keys_bad.yaml",
], "schema.yaml", 1, "PyYAML")
assert "map.bad: '12.5' is not a str." in e.value.message
assert "map.key: Required field missing" in e.value.message


@pytest.mark.parametrize("parser", parsers)
def test_good_relative_yaml(parser):
command_line._router(
Expand Down

0 comments on commit f459716

Please sign in to comment.