tests/import: Add a test which uses ... in from-import statement.
This commit is contained in:
parent
9af73bda33
commit
67f3edc10a
|
@ -0,0 +1,2 @@
|
|||
# This tests ... relative imports as used in pkg7
|
||||
import pkg7.subpkg1.subpkg2.mod3
|
|
@ -0,0 +1 @@
|
|||
print("pkg __name__:", __name__)
|
|
@ -0,0 +1,2 @@
|
|||
print('mod1')
|
||||
foo = 'mod1.foo'
|
|
@ -0,0 +1,2 @@
|
|||
print('mod2')
|
||||
bar = 'mod2.bar'
|
|
@ -0,0 +1 @@
|
|||
print("pkg __name__:", __name__)
|
|
@ -0,0 +1 @@
|
|||
print("pkg __name__:", __name__)
|
|
@ -0,0 +1,4 @@
|
|||
from ... import mod1
|
||||
from ...mod2 import bar
|
||||
print(mod1.foo)
|
||||
print(bar)
|
Loading…
Reference in New Issue