From 04f61cf7c47159f4d99e72246dac9116f5b99586 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Wed, 27 Oct 2021 11:19:39 +0200 Subject: Add a test for Pylinter.check() deprecation --- tests/lint/test_pylinter.py | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- cgit v1.2.1