mirror of
https://github.com/micropython/micropython.git
synced 2026-05-03 06:10:14 +02:00
tests/cpydiff: Add cpydiff test for __all__ used in imported package.
This commit is contained in:
committed by
Damien George
parent
73c58150f5
commit
309c19d39b
@@ -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()
|
||||
@@ -0,0 +1 @@
|
||||
__all__ = ["foo"]
|
||||
@@ -0,0 +1,2 @@
|
||||
def hello():
|
||||
print("hello")
|
||||
Reference in New Issue
Block a user