From 2ff3d9d0b2f53fe4a9e2fcb1ab2cff045211d78b Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 12 Apr 2014 02:44:47 +0300 Subject: builtinimport: Set __path__ attribute ASAP as it's clear we have a package. This helps with handling "recursive" imports in sane manner, for example when foo/__init__.py has something like "from foo import submod". --- tests/basics/pkg2/__init__.py | 1 + tests/basics/pkg2/mod1.py | 1 + tests/basics/pkg2/mod2.py | 1 + 3 files changed, 3 insertions(+) create mode 100644 tests/basics/pkg2/__init__.py create mode 100644 tests/basics/pkg2/mod1.py create mode 100644 tests/basics/pkg2/mod2.py (limited to 'tests/basics/pkg2') diff --git a/tests/basics/pkg2/__init__.py b/tests/basics/pkg2/__init__.py new file mode 100644 index 000000000..101ac7d40 --- /dev/null +++ b/tests/basics/pkg2/__init__.py @@ -0,0 +1 @@ +from pkg2 import mod1 diff --git a/tests/basics/pkg2/mod1.py b/tests/basics/pkg2/mod1.py new file mode 100644 index 000000000..03754a45f --- /dev/null +++ b/tests/basics/pkg2/mod1.py @@ -0,0 +1 @@ +from pkg2 import mod2 diff --git a/tests/basics/pkg2/mod2.py b/tests/basics/pkg2/mod2.py new file mode 100644 index 000000000..97dadcde4 --- /dev/null +++ b/tests/basics/pkg2/mod2.py @@ -0,0 +1 @@ +print("in mod2") -- cgit v1.2.3