Fix for failing assertion on native modules Issue #1354 (#1370)

This commit is contained in:
Johannes-Maria Frank
2019-07-23 12:02:08 +01:00
committed by Dave Halter
parent 18eb7622ba
commit 02d16ac55c
3 changed files with 11 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ import pytest
import jedi
from jedi._compatibility import is_py3, py_version
from jedi.evaluate.compiled import mixed
from importlib import import_module
if py_version > 30:
def exec_(source, global_map):
@@ -439,3 +439,9 @@ def test__wrapped__():
c, = jedi.Interpreter('syslogs_to_df', [locals()]).completions()
# Apparently the function starts on the line where the decorator starts.
assert c.line == syslogs_to_df.__wrapped__.__code__.co_firstlineno + 1
@pytest.mark.parametrize('module_name', ['sys', 'time'])
def test_core_module_completes(module_name):
module = import_module(module_name)
assert jedi.Interpreter(module_name + '.\n', [locals()]).completions()