1
0
forked from VimPlug/jedi

Fix load_unsafe_extensions issue

This commit is contained in:
Dave Halter
2020-02-05 10:01:21 +01:00
parent b7919bd3e6
commit f2722952e7

View File

@@ -4,7 +4,7 @@ Test compiled module
import os import os
import jedi import jedi
from ..helpers import cwd_at from ..helpers import get_example_dir
import pytest import pytest
@@ -34,9 +34,8 @@ def test_get_signatures_stdlib(Script):
# Check only on linux 64 bit platform and Python3.4. # Check only on linux 64 bit platform and Python3.4.
@pytest.mark.skipif('sys.platform != "linux" or sys.maxsize <= 2**32 or sys.version_info[:2] != (3, 4)')
@pytest.mark.parametrize('load_unsafe_extensions', [False, True]) @pytest.mark.parametrize('load_unsafe_extensions', [False, True])
@cwd_at('test/examples') @pytest.mark.skipif('sys.platform != "linux" or sys.maxsize <= 2**32 or sys.version_info[:2] != (3, 4)')
def test_init_extension_module(Script, load_unsafe_extensions): def test_init_extension_module(Script, load_unsafe_extensions):
""" """
``__init__`` extension modules are also packages and Jedi should understand ``__init__`` extension modules are also packages and Jedi should understand
@@ -51,7 +50,8 @@ def test_init_extension_module(Script, load_unsafe_extensions):
This is also why this test only runs on certain systems (and Python 3.4). This is also why this test only runs on certain systems (and Python 3.4).
""" """
project = jedi.Project('.', load_unsafe_extensions=load_unsafe_extensions)
project = jedi.Project(get_example_dir(), load_unsafe_extensions=load_unsafe_extensions)
s = jedi.Script( s = jedi.Script(
'import init_extension_module as i\ni.', 'import init_extension_module as i\ni.',
path='not_existing.py', path='not_existing.py',