tests/cpydiff: Add cpydiff test for __all__ used in imported package.
This commit is contained in:
parent
73c58150f5
commit
309c19d39b
9
tests/cpydiff/core_import_all.py
Normal file
9
tests/cpydiff/core_import_all.py
Normal 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()
|
1
tests/cpydiff/modules3/__init__.py
Normal file
1
tests/cpydiff/modules3/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
__all__ = ["foo"]
|
2
tests/cpydiff/modules3/foo.py
Normal file
2
tests/cpydiff/modules3/foo.py
Normal file
@ -0,0 +1,2 @@
|
||||
def hello():
|
||||
print("hello")
|
Loading…
x
Reference in New Issue
Block a user