circuitpython/tests/import/pkg7/subpkg1/subpkg2/mod3.py
Damien George 53519e322a py/builtinimport: Change relative import's ValueError to ImportError.
Following CPython change, see https://bugs.python.org/issue37444.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-30 19:35:03 +10:00

12 lines
203 B
Python

from ... import mod1
from ...mod2 import bar
print(mod1.foo)
print(bar)
# attempted relative import beyond top-level package
try:
from .... import mod1
except ImportError:
print("ImportError")