mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 12:40:15 +01:00
tests/unix/extra_coverage: Add tests for importing frozen packages.
This commit is contained in:
@@ -17,3 +17,15 @@ print(hash(str(data[1], 'utf8')))
|
||||
# test basic import of frozen scripts
|
||||
import frzstr1
|
||||
import frzmpy1
|
||||
|
||||
# test import of frozen packages with __init__.py
|
||||
import frzstr_pkg1
|
||||
print(frzstr_pkg1.x)
|
||||
import frzmpy_pkg1
|
||||
print(frzmpy_pkg1.x)
|
||||
|
||||
# test import of frozen packages without __init__.py
|
||||
from frzstr_pkg2.mod import Foo
|
||||
print(Foo.x)
|
||||
from frzmpy_pkg2.mod import Foo
|
||||
print(Foo.x)
|
||||
|
||||
Reference in New Issue
Block a user