mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Merge 61848afc7c into 6aee460b1d
This commit is contained in:
@@ -9,8 +9,10 @@ import pytest
|
||||
|
||||
import jedi
|
||||
import jedi.settings
|
||||
from jedi import Project
|
||||
from jedi.inference.compiled import mixed
|
||||
from importlib import import_module
|
||||
from test.helpers import get_example_dir
|
||||
|
||||
|
||||
class _GlobalNameSpace:
|
||||
@@ -591,6 +593,18 @@ def test_dict_completion(code, column, expected):
|
||||
assert [c.complete for c in comps] == expected
|
||||
|
||||
|
||||
def test_implicit_namespace_package_with_subpackages():
|
||||
sys_path = [
|
||||
get_example_dir('implicit_namespace_package_with_subpackages', 'ns1'),
|
||||
get_example_dir('implicit_namespace_package_with_subpackages', 'ns2'),
|
||||
]
|
||||
project = Project('.', sys_path=sys_path)
|
||||
interpreter = jedi.Interpreter("import pkg; pkg.", namespaces=[], project=project)
|
||||
comps = interpreter.complete()
|
||||
expected = ["pkgA", "pkgB"]
|
||||
assert [c.complete for c in comps] == expected
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'code, types', [
|
||||
('dct[1]', ['int']),
|
||||
|
||||
Reference in New Issue
Block a user