Skip to content

Commit

Permalink
#93: Fix RegexCommand test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
MattPrit committed Sep 5, 2022
1 parent 1e91fee commit 2eb01b2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/adapters/interpreters/command/test_regex_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,16 @@ def test_parse_gives_correct_whole_matches(
_, _, end, message_length = result
full_match = end == message_length
assert full_match == full_match_expected


@pytest.mark.parametrize(
["regex", "interrupt", "format", "message"],
[
(r"Test", False, None, rb"Test"),
],
)
def test_parse_returns_none_if_message_and_regex_incompatible(
regex_command: RegexCommand, message
):
result = regex_command.parse(message)
assert result is None

0 comments on commit 2eb01b2

Please sign in to comment.