tests/import: Add a test which uses ... in from-import statement.

This commit is contained in:
Damien George 2016-12-21 11:25:53 +11:00
parent 9af73bda33
commit 67f3edc10a
7 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,2 @@
# This tests ... relative imports as used in pkg7
import pkg7.subpkg1.subpkg2.mod3

View File

@ -0,0 +1 @@
print("pkg __name__:", __name__)

View File

@ -0,0 +1,2 @@
print('mod1')
foo = 'mod1.foo'

View File

@ -0,0 +1,2 @@
print('mod2')
bar = 'mod2.bar'

View File

@ -0,0 +1 @@
print("pkg __name__:", __name__)

View File

@ -0,0 +1 @@
print("pkg __name__:", __name__)

View File

@ -0,0 +1,4 @@
from ... import mod1
from ...mod2 import bar
print(mod1.foo)
print(bar)