Skip to content

Commit

Permalink
Fix test failures in 0.28.0 with Jedi 0.13 (#627)
Browse files Browse the repository at this point in the history
  • Loading branch information
steff456 authored and ccordoba12 committed Jul 31, 2019
1 parent 697ebb1 commit 9447bd7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/plugins/test_completion.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Copyright 2017 Palantir Technologies, Inc.
from distutils.version import LooseVersion
import os
import jedi
import pytest

from pyls import uris, lsp
from pyls.workspace import Document
Expand Down Expand Up @@ -42,6 +45,8 @@ def test_rope_import_completion(config, workspace):
assert items is None


@pytest.mark.skipif(LooseVersion(jedi.__version__) < LooseVersion('0.14.0'),
reason='This test fails with previous versions of jedi')
def test_jedi_completion(config):
# Over 'i' in os.path.isabs(...)
com_position = {'line': 1, 'character': 15}
Expand Down
7 changes: 7 additions & 0 deletions test/plugins/test_definitions.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Copyright 2017 Palantir Technologies, Inc.
from distutils.version import LooseVersion
import jedi
import pytest

from pyls import uris
from pyls.plugins.definition import pyls_definitions
from pyls.workspace import Document


DOC_URI = uris.from_fs_path(__file__)
DOC = """def a():
pass
Expand Down Expand Up @@ -33,6 +38,8 @@ def test_definitions(config):
assert [{'uri': DOC_URI, 'range': def_range}] == pyls_definitions(config, doc, cursor_pos)


@pytest.mark.skipif(LooseVersion(jedi.__version__) < LooseVersion('0.14.0'),
reason='This test fails with previous versions of jedi')
def test_builtin_definition(config):
# Over 'i' in dict
cursor_pos = {'line': 8, 'character': 24}
Expand Down
6 changes: 6 additions & 0 deletions test/plugins/test_symbols.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copyright 2017 Palantir Technologies, Inc.
from distutils.version import LooseVersion
import jedi
import pytest

from pyls import uris
from pyls.plugins.symbols import pyls_document_symbols
from pyls.lsp import SymbolKind
Expand All @@ -21,6 +25,8 @@ def main(x):
"""


@pytest.mark.skipif(LooseVersion(jedi.__version__) < LooseVersion('0.14.0'),
reason='This test fails with previous versions of jedi')
def test_symbols(config):
doc = Document(DOC_URI, DOC)
config.update({'plugins': {'jedi_symbols': {'all_scopes': False}}})
Expand Down

0 comments on commit 9447bd7

Please sign in to comment.