tests/cpydiff: Add cpydiff test for __all__ used in imported package.

This commit is contained in:
Jim Mussared 2020-04-28 13:43:07 +10:00 committed by Damien George
parent 73c58150f5
commit 309c19d39b
3 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,9 @@
"""
categories: Core,import
description: __all__ is unsupported in __init__.py in MicroPython.
cause: Not implemented.
workaround: Manually import the sub-modules directly in __init__.py using ``from . import foo, bar``.
"""
from modules3 import *
foo.hello()

View File

@ -0,0 +1 @@
__all__ = ["foo"]

View File

@ -0,0 +1,2 @@
def hello():
print("hello")