Skip to content

Commit

Permalink
Use JEDI_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Apr 28, 2021
1 parent 89d60ab commit e81594c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/plugins/test_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from pylsp.workspace import Document
from pylsp.plugins.jedi_completion import pylsp_completions as pylsp_jedi_completions
from pylsp.plugins.rope_completion import pylsp_completions as pylsp_rope_completions
from pylsp._utils import JEDI_VERSION


PY2 = sys.version[0] == '2'
Expand Down Expand Up @@ -114,11 +115,8 @@ class TypeCase(NamedTuple):

@pytest.mark.parametrize('case', list(TYPE_CASES.values()), ids=list(TYPE_CASES.keys()))
def test_jedi_completion_type(case, config, workspace):
# pylint: disable=C0415
import jedi

# property support was introduced in 0.18
if case.expected == lsp.CompletionItemKind.Property and jedi.__version__.startswith('0.17'):
if case.expected == lsp.CompletionItemKind.Property and JEDI_VERSION.startswith('0.17'):
return

doc = Document(DOC_URI, workspace, case.document)
Expand Down

0 comments on commit e81594c

Please sign in to comment.