summaryrefslogtreecommitdiff
path: root/tests/lint
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-10-27 11:32:29 +0200
committerGitHub <noreply@github.com>2021-10-27 11:32:29 +0200
commitee85728805ca3bc9ab888b9224416aeb4861e0c3 (patch)
treee06249aa6bfc50de90498b07436ac325ba1bdb03 /tests/lint
parent1f77ff6135bc280a6cfd46fc3bd917d3436d55e2 (diff)
downloadpylint-git-ee85728805ca3bc9ab888b9224416aeb4861e0c3.tar.gz
Fix deprecation 'check function will only accept sequence of string' (#5218)
* Fix deprecation 'check function will only accept sequence of string' * Add a test for Pylinter.check() deprecation
Diffstat (limited to 'tests/lint')
-rw-r--r--tests/lint/test_pylinter.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/lint/test_pylinter.py b/tests/lint/test_pylinter.py
index 27fc10ebf..900d53fb3 100644
--- a/tests/lint/test_pylinter.py
+++ b/tests/lint/test_pylinter.py
@@ -35,3 +35,9 @@ def test_crash_in_file(
with open(files[0], encoding="utf8") as f:
content = f.read()
assert "Failed to import module spam." in content
+
+
+def test_check_deprecation(linter: PyLinter, recwarn):
+ linter.check("myfile.py")
+ msg = recwarn.pop()
+ assert "check function will only accept sequence" in str(msg)