Skip to content

Commit 3923f96

Browse files
committed
tests/cpydiff/core_import_path: Test showing difference in package.__path__.
1 parent ab4a861 commit 3923f96

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/cpydiff/core_import_path.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"""
2+
categories: Core,import
3+
description: __path__ attribute of a package has a different type (single string instead of list of strings) in MicroPython
4+
cause: MicroPython does't support namespace packages split across filesystem. Beyond that, MicroPython's import system is highly optimized for minimal memory usage.
5+
workaround: Details of import handling is inherently implementation dependent. Don't rely on such details in portable applications.
6+
"""
7+
import modules
8+
9+
print(modules.__path__)

0 commit comments

Comments
 (0)