mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 20:50:14 +01:00
tests/misc: Add test for cexample module.
This also moves the existing test for cexample.add_ints originally done in extra_coverage. Signed-off-by: Laurens Valk <laurens@pybricks.com>
This commit is contained in:
committed by
Damien George
parent
d75f49c0f0
commit
1d27c7d423
14
tests/misc/cexample_module.py
Normal file
14
tests/misc/cexample_module.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# test custom builtin module
|
||||
|
||||
try:
|
||||
import cexample
|
||||
except ImportError:
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
print(cexample)
|
||||
|
||||
d = dir(cexample)
|
||||
d.index("add_ints")
|
||||
|
||||
print(cexample.add_ints(1, 3))
|
||||
2
tests/misc/cexample_module.py.exp
Normal file
2
tests/misc/cexample_module.py.exp
Normal file
@@ -0,0 +1,2 @@
|
||||
<module 'cexample'>
|
||||
4
|
||||
Reference in New Issue
Block a user