summaryrefslogtreecommitdiff
path: root/tests/checkers
diff options
context:
space:
mode:
authorEli Fine <ubuntu@ip-172-31-89-59.ec2.internal>2021-04-09 17:27:53 +0000
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-04-10 08:36:29 +0200
commita9bb2ad5e8f00e960be7d7faa7794a8297752a82 (patch)
treedebd75904531e6903377117a355364f9cb296a9c /tests/checkers
parent3c105a4c6f552082fbadfd3f535a1daaa2eaa973 (diff)
downloadpylint-git-a9bb2ad5e8f00e960be7d7faa7794a8297752a82.tar.gz
obtaining list of comment directives to ignore from pylintrc
Diffstat (limited to 'tests/checkers')
-rw-r--r--tests/checkers/unittest_spelling.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/checkers/unittest_spelling.py b/tests/checkers/unittest_spelling.py
index 0d946bc84..d5011dba0 100644
--- a/tests/checkers/unittest_spelling.py
+++ b/tests/checkers/unittest_spelling.py
@@ -380,6 +380,27 @@ class TestSpellingChecker(
self.checker.process_tokens(_tokenize_str(full_comment))
@skip_on_missing_package_or_dict
+ @set_config(
+ spelling_dict=spell_dict,
+ spelling_ignore_comment_directives="newdirective:,noqa",
+ )
+ def test_skip_directives_specified_in_pylintrc(self):
+ full_comment = "# newdirective: do this newdirective"
+ with self.assertAddsMessages(
+ Message(
+ "wrong-spelling-in-comment",
+ line=1,
+ args=(
+ "newdirective",
+ full_comment,
+ " ^^^^^^^^^^^^",
+ self._get_msg_suggestions("newdirective"),
+ ),
+ )
+ ):
+ self.checker.process_tokens(_tokenize_str(full_comment))
+
+ @skip_on_missing_package_or_dict
@set_config(spelling_dict=spell_dict)
def test_handle_words_joined_by_forward_slash(self):
stmt = astroid.extract_node(