mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-09 21:42:20 +08:00
updated/added import test (nested structures)
This commit is contained in:
@@ -67,3 +67,18 @@ def c():
|
||||
c
|
||||
#! 0 ['def c']
|
||||
c()
|
||||
|
||||
# -----------------
|
||||
# imports
|
||||
# -----------------
|
||||
|
||||
#! ['module import_tree']
|
||||
import import_tree
|
||||
|
||||
#! ['module mod1']
|
||||
import import_tree.mod1
|
||||
|
||||
#! ['module mod1']
|
||||
from import_tree import mod1
|
||||
|
||||
|
||||
|
||||
1
test/completion/import_tree/__init__.py
Normal file
1
test/completion/import_tree/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
a = ""
|
||||
1
test/completion/import_tree/mod1.py
Normal file
1
test/completion/import_tree/mod1.py
Normal file
@@ -0,0 +1 @@
|
||||
a = 1
|
||||
@@ -1,3 +1,39 @@
|
||||
# -----------------
|
||||
# own structure
|
||||
# -----------------
|
||||
|
||||
# do separate scopes
|
||||
def scope_basic():
|
||||
from import_tree import mod1
|
||||
|
||||
#? int()
|
||||
mod1.a
|
||||
|
||||
#? []
|
||||
import_tree.a
|
||||
|
||||
#? []
|
||||
import_tree.mod1
|
||||
|
||||
import import_tree
|
||||
#? str()
|
||||
import_tree.a
|
||||
|
||||
#? []
|
||||
import_tree.mod1
|
||||
|
||||
def scope_nested():
|
||||
import import_tree.mod1
|
||||
|
||||
#? str()
|
||||
import_tree.a
|
||||
|
||||
#? ['mod1']
|
||||
import_tree.mod1
|
||||
|
||||
#? int()
|
||||
import_tree.mod1.a
|
||||
|
||||
# -----------------
|
||||
# std lib modules
|
||||
# -----------------
|
||||
|
||||
3
test/completion/thirdparty/pylab.py
vendored
3
test/completion/thirdparty/pylab.py
vendored
@@ -2,8 +2,9 @@ import pylab
|
||||
pylab.
|
||||
|
||||
# two gotos
|
||||
#! ['module /usr/lib/python2.7/dist-packages/numpy/__init__.py']
|
||||
#! ['module numpy']
|
||||
import numpy
|
||||
|
||||
#! ['module random']
|
||||
import numpy.random
|
||||
|
||||
|
||||
Reference in New Issue
Block a user