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

pull/6006/head
Jim Mussared 2020-04-28 13:43:07 +10:00 zatwierdzone przez Damien George
rodzic 73c58150f5
commit 309c19d39b
3 zmienionych plików z 12 dodań i 0 usunięć

Wyświetl plik

@ -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()

Wyświetl plik

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

Wyświetl plik

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