From 7eb31baa306160084b38101326183a0181d95aa4 Mon Sep 17 00:00:00 2001 From: Martijn Jacobs Date: Fri, 6 Oct 2023 11:12:39 +0200 Subject: [PATCH] Improve test so we are sure the exclude section has this side-effect --- test/test_plugin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/test_plugin.py b/test/test_plugin.py index 6a9515e..f7439e8 100644 --- a/test/test_plugin.py +++ b/test/test_plugin.py @@ -361,7 +361,10 @@ def test_config_exclude(tmpdir, workspace): doc = Document(DOC_URI, workspace, DOC_TYPE_ERR) plugin.pylsp_settings(workspace._config) - workspace.update_config({"pylsp": {"plugins": {"pylsp_mypy": {"exclude": [doc.path]}}}}) + workspace.update_config({"pylsp": {"plugins": {"pylsp_mypy": {}}}}) diags = plugin.pylsp_lint(workspace._config, workspace, doc, is_saved=False) + assert diags[0]["message"] == TYPE_ERR_MSG - assert not diags + workspace.update_config({"pylsp": {"plugins": {"pylsp_mypy": {"exclude": [doc.path]}}}}) + diags = plugin.pylsp_lint(workspace._config, workspace, doc, is_saved=False) + assert diags == []