diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2020-05-14 19:03:24 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2020-05-14 19:04:32 +0200 |
commit | ffb354aea057c25d9e48fa22da2840a450d99f3e (patch) | |
tree | 2a75d6593a70474b5f647060a72be0d86deef0ee /tests/test_pragma_parser.py | |
parent | b73afc8e3d89df143ce686c7086939710ebf29c3 (diff) | |
download | pylint-git-ffb354aea057c25d9e48fa22da2840a450d99f3e.tar.gz |
Fix a regression where messages with dash are not fully parsed
Close #3604
Diffstat (limited to 'tests/test_pragma_parser.py')
-rw-r--r-- | tests/test_pragma_parser.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_pragma_parser.py b/tests/test_pragma_parser.py index 1aaed30d5..1e5b16b28 100644 --- a/tests/test_pragma_parser.py +++ b/tests/test_pragma_parser.py @@ -82,3 +82,11 @@ def test_missing_message(): match = OPTION_PO.search(comment) with pytest.raises(InvalidPragmaError): list(parse_pragma(match.group(2))) + + +def test_parse_message_with_dash(): + comment = "#pylint: disable = raw_input-builtin" + match = OPTION_PO.search(comment) + res = list(parse_pragma(match.group(2))) + assert res[0].action == "disable" + assert res[0].messages == ["raw_input-builtin"] |