summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/import/import_pkg7.py2
-rw-r--r--tests/import/pkg7/__init__.py1
-rw-r--r--tests/import/pkg7/mod1.py2
-rw-r--r--tests/import/pkg7/mod2.py2
-rw-r--r--tests/import/pkg7/subpkg1/__init__.py1
-rw-r--r--tests/import/pkg7/subpkg1/subpkg2/__init__.py1
-rw-r--r--tests/import/pkg7/subpkg1/subpkg2/mod3.py4
7 files changed, 13 insertions, 0 deletions
diff --git a/tests/import/import_pkg7.py b/tests/import/import_pkg7.py
new file mode 100644
index 000000000..be8564ef6
--- /dev/null
+++ b/tests/import/import_pkg7.py
@@ -0,0 +1,2 @@
+# This tests ... relative imports as used in pkg7
+import pkg7.subpkg1.subpkg2.mod3
diff --git a/tests/import/pkg7/__init__.py b/tests/import/pkg7/__init__.py
new file mode 100644
index 000000000..8b92fa996
--- /dev/null
+++ b/tests/import/pkg7/__init__.py
@@ -0,0 +1 @@
+print("pkg __name__:", __name__)
diff --git a/tests/import/pkg7/mod1.py b/tests/import/pkg7/mod1.py
new file mode 100644
index 000000000..6b574114d
--- /dev/null
+++ b/tests/import/pkg7/mod1.py
@@ -0,0 +1,2 @@
+print('mod1')
+foo = 'mod1.foo'
diff --git a/tests/import/pkg7/mod2.py b/tests/import/pkg7/mod2.py
new file mode 100644
index 000000000..039a5d174
--- /dev/null
+++ b/tests/import/pkg7/mod2.py
@@ -0,0 +1,2 @@
+print('mod2')
+bar = 'mod2.bar'
diff --git a/tests/import/pkg7/subpkg1/__init__.py b/tests/import/pkg7/subpkg1/__init__.py
new file mode 100644
index 000000000..8b92fa996
--- /dev/null
+++ b/tests/import/pkg7/subpkg1/__init__.py
@@ -0,0 +1 @@
+print("pkg __name__:", __name__)
diff --git a/tests/import/pkg7/subpkg1/subpkg2/__init__.py b/tests/import/pkg7/subpkg1/subpkg2/__init__.py
new file mode 100644
index 000000000..8b92fa996
--- /dev/null
+++ b/tests/import/pkg7/subpkg1/subpkg2/__init__.py
@@ -0,0 +1 @@
+print("pkg __name__:", __name__)
diff --git a/tests/import/pkg7/subpkg1/subpkg2/mod3.py b/tests/import/pkg7/subpkg1/subpkg2/mod3.py
new file mode 100644
index 000000000..b85b34e60
--- /dev/null
+++ b/tests/import/pkg7/subpkg1/subpkg2/mod3.py
@@ -0,0 +1,4 @@
+from ... import mod1
+from ...mod2 import bar
+print(mod1.foo)
+print(bar)