Skip to content

Commit b344c0c

Browse files
Jochen Sprickerhofjspricke
authored andcommitted
Fix pylint test without pylsp installed
In case pylsp is not installed, the pylint plugin is not found in Config.__init__ and Config._plugin_settings is empty. This is fine except test_pylint_lint.test_pylint tries to set the pylint executable in the settings. This patch works around this by patching in the config.
1 parent b2bdeea commit b344c0c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

test/fixtures.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ def workspace_other_root_path(tmpdir):
8282
@pytest.fixture
8383
def config(workspace): # pylint: disable=redefined-outer-name
8484
"""Return a config object."""
85-
return Config(workspace.root_uri, {}, 0, {})
85+
config = Config(workspace.root_uri, {}, 0, {})
86+
config._plugin_settings = {'plugins': {'pylint': {'enabled': False, 'args': [], 'executable': None}}}
87+
return config
8688

8789

8890
@pytest.fixture

0 commit comments

Comments
 (0)