Skip to content

Commit

Permalink
improving test_pragma_parser (#8159)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrehora authored Feb 2, 2023
1 parent b04e690 commit 5c0084b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_pragma_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ def test_unknown_keyword_with_messages() -> None:
list(parse_pragma(match.group(2)))


def test_unknown_keyword_with_missing_messages() -> None:
comment = "#pylint: unknown-keyword = "
match = OPTION_PO.search(comment)
assert match
with pytest.raises(UnRecognizedOptionError):
list(parse_pragma(match.group(2)))


def test_unknown_keyword_without_messages() -> None:
comment = "#pylint: unknown-keyword"
match = OPTION_PO.search(comment)
Expand Down

0 comments on commit 5c0084b

Please sign in to comment.