add test for namespaced packages

This commit is contained in:
scribu
2016-07-11 21:56:56 +03:00
committed by Dave Halter
parent 1fa16337b7
commit 4fbde0001a
4 changed files with 17 additions and 0 deletions

View File

@@ -51,3 +51,15 @@ def test_namespace_package():
completion = c
solution = "statement: foo = '%s'" % solution
assert completion.description == solution
def test_nested_namespace_package():
CODE = 'from nested_namespaces.namespace.pkg import CONST'
sys_path = [dirname(__file__)]
script = jedi.Script(sys_path=sys_path, source=CODE, line=1, column=45)
result = script.goto_definitions()
assert len(result) == 1