From ee831cafa92a1a8f7a63eacf2e4911d8fabe7116 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 16 Feb 2015 12:10:14 +0200 Subject: [PATCH] tests: Add another testcase for relative imports. --- tests/import/import_pkg6.py | 2 ++ tests/import/pkg6/__init__.py | 2 ++ tests/import/pkg6/x/__init__.py | 2 ++ tests/import/pkg6/x/y.py | 1 + 4 files changed, 7 insertions(+) create mode 100644 tests/import/import_pkg6.py create mode 100644 tests/import/pkg6/__init__.py create mode 100644 tests/import/pkg6/x/__init__.py create mode 100644 tests/import/pkg6/x/y.py diff --git a/tests/import/import_pkg6.py b/tests/import/import_pkg6.py new file mode 100644 index 0000000000..3d26e6ffc2 --- /dev/null +++ b/tests/import/import_pkg6.py @@ -0,0 +1,2 @@ +# This tests relative imports as used in pkg6 +import pkg6 diff --git a/tests/import/pkg6/__init__.py b/tests/import/pkg6/__init__.py new file mode 100644 index 0000000000..923531c1b9 --- /dev/null +++ b/tests/import/pkg6/__init__.py @@ -0,0 +1,2 @@ +from .x import * +print('init') diff --git a/tests/import/pkg6/x/__init__.py b/tests/import/pkg6/x/__init__.py new file mode 100644 index 0000000000..6b8b84d0ee --- /dev/null +++ b/tests/import/pkg6/x/__init__.py @@ -0,0 +1,2 @@ +from .y import * +print('x') diff --git a/tests/import/pkg6/x/y.py b/tests/import/pkg6/x/y.py new file mode 100644 index 0000000000..e8d863c6cd --- /dev/null +++ b/tests/import/pkg6/x/y.py @@ -0,0 +1 @@ +print('y')