Skip to content

Commit

Permalink
Improve test so we are sure the exclude section has this side-effect
Browse files Browse the repository at this point in the history
  • Loading branch information
maerteijn committed Oct 21, 2023
1 parent 22d4b72 commit 7eb31ba
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 == []

0 comments on commit 7eb31ba

Please sign in to comment.