Skip to content

Commit 7eb31ba

Browse files
committed
Improve test so we are sure the exclude section has this side-effect
1 parent 22d4b72 commit 7eb31ba

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/test_plugin.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,10 @@ def test_config_exclude(tmpdir, workspace):
361361
doc = Document(DOC_URI, workspace, DOC_TYPE_ERR)
362362

363363
plugin.pylsp_settings(workspace._config)
364-
workspace.update_config({"pylsp": {"plugins": {"pylsp_mypy": {"exclude": [doc.path]}}}})
364+
workspace.update_config({"pylsp": {"plugins": {"pylsp_mypy": {}}}})
365365
diags = plugin.pylsp_lint(workspace._config, workspace, doc, is_saved=False)
366+
assert diags[0]["message"] == TYPE_ERR_MSG
366367

367-
assert not diags
368+
workspace.update_config({"pylsp": {"plugins": {"pylsp_mypy": {"exclude": [doc.path]}}}})
369+
diags = plugin.pylsp_lint(workspace._config, workspace, doc, is_saved=False)
370+
assert diags == []

0 commit comments

Comments
 (0)