Update test_violation.py

Added tests to check if long error codes are correctly identified.
This commit is contained in:
Markus Piotrowski 2019-06-16 17:02:54 +00:00
parent 0ac337608b
commit 37964dbd84

View file

@ -23,6 +23,9 @@ from flake8 import style_guide
('E111', 'a = 1 # noqa - We do not care', True),
('E111', 'a = 1 # noqa: We do not care', True),
('E111', 'a = 1 # noqa:We do not care', True),
('ABC123', 'a = 1 # noqa: ABC123', True),
('E111', 'a = 1 # noqa: ABC123', False),
('ABC123', 'a = 1 # noqa: ABC124', False),
])
def test_is_inline_ignored(error_code, physical_line, expected_result):
"""Verify that we detect inline usage of ``# noqa``."""