diff --git a/tests/test_check_parallel.py b/tests/test_check_parallel.py index 5219ba21b1..6851acd985 100644 --- a/tests/test_check_parallel.py +++ b/tests/test_check_parallel.py @@ -89,7 +89,9 @@ def test_worker_initialize(self): def test_worker_check_single_file_uninitialised(self): pylint.lint.parallel._worker_linter = None - with pytest.raises(AttributeError, msg="Something has unexpectedly changed"): + with pytest.raises( # Objects that do not match the linter interface will fail + AttributeError, match="'NoneType' object has no attribute 'open'" + ): worker_check_single_file(_gen_file_data()) def test_worker_check_single_file_no_checkers(self):