summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Piotrowski <markus.piotrowski@ruhr-uni-bochum.de>2019-06-16 17:02:54 +0000
committerMarkus Piotrowski <markus.piotrowski@ruhr-uni-bochum.de>2019-06-16 17:02:54 +0000
commit37964dbd848c89e0acdef7d5ea0bf812539f852c (patch)
tree8a53b40072659e1e02e35290953c7b20f5706d7f
parent0ac337608b3d88079aa91bdcffed7b4df6fd28a8 (diff)
downloadflake8-37964dbd848c89e0acdef7d5ea0bf812539f852c.tar.gz
Update test_violation.py
Added tests to check if long error codes are correctly identified.
-rw-r--r--tests/unit/test_violation.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/unit/test_violation.py b/tests/unit/test_violation.py
index e29d874..a3a56f0 100644
--- a/tests/unit/test_violation.py
+++ b/tests/unit/test_violation.py
@@ -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``."""