python-lsp / python-lsp-server

Fork of the python-language-server project, maintained by the Spyder IDE team and the community
MIT License
1.96k stars 194 forks source link

`test_jedi_completion_with_fuzzy_enabled` fails with jedi 0.19.2 #602

Open frenzymadness opened 2 weeks ago

frenzymadness commented 2 weeks ago

The failure is:

=================================== FAILURES ===================================
___________________ test_jedi_completion_with_fuzzy_enabled ____________________

config = <pylsp.config.config.Config object at 0x7f3b90f363f0>
workspace = <pylsp.workspace.Workspace object at 0x7f3b9129ef30>

    def test_jedi_completion_with_fuzzy_enabled(config, workspace) -> None:
        # Over 'i' in os.path.isabs(...)
        config.update({"plugins": {"jedi_completion": {"fuzzy": True}}})
        com_position = {"line": 1, "character": 15}
        doc = Document(DOC_URI, workspace, DOC)

        items = pylsp_jedi_completions(config, doc, com_position)

        assert items

        expected = "commonprefix(m)"
        if JEDI_VERSION == "0.18.0":
            expected = "commonprefix(list)"
>       assert items[0]["label"] == expected
E       AssertionError: assert 'isabs(s)' == 'commonprefix(m)'
E         
E         - commonprefix(m)
E         + isabs(s)

test/plugins/test_completion.py:185: AssertionError