Skip to content

Commit

Permalink
Basic test for multiple missing scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
Qalthos committed Feb 14, 2025
1 parent 03acde4 commit fd91315
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/unit/test_scenarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,20 @@ def test_verify_raises_when_scenario_not_found( # noqa: D103
assert msg in caplog.text


def test_verify_raises_when_multiple_scenarios_not_found( # noqa: D103
_instance: scenarios.Scenarios, # noqa: PT019
caplog: pytest.LogCaptureFixture,
) -> None:
_instance._scenario_names = ["invalid", "also invalid"]
with pytest.raises(SystemExit) as e:
_instance._verify()

assert e.value.code == 1

msg = "Scenarios 'also invalid, invalid' not found. Exiting."
assert msg in caplog.text


def test_filter_for_scenario( # noqa: D103
_instance: scenarios.Scenarios, # noqa: PT019
) -> None:
Expand Down

0 comments on commit fd91315

Please sign in to comment.