summaryrefslogtreecommitdiffstatshomepage
path: root/tests/misc/cexample_module.py
diff options
context:
space:
mode:
authorLaurens Valk <laurens@pybricks.com>2022-11-21 15:13:24 +0100
committerDamien George <damien.p.george@gmail.com>2022-11-23 11:44:13 +1100
commit1d27c7d423f4e7b2c1f2e9b68d99a33ac26d81eb (patch)
tree68832504f0f63a1bfa7f70f566dd008550bfb2a3 /tests/misc/cexample_module.py
parentd75f49c0f04280f5725f635a4b041f409a25fa7d (diff)
downloadmicropython-1d27c7d423f4e7b2c1f2e9b68d99a33ac26d81eb.tar.gz
micropython-1d27c7d423f4e7b2c1f2e9b68d99a33ac26d81eb.zip
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>
Diffstat (limited to 'tests/misc/cexample_module.py')
-rw-r--r--tests/misc/cexample_module.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/misc/cexample_module.py b/tests/misc/cexample_module.py
new file mode 100644
index 0000000000..cf1d46f750
--- /dev/null
+++ b/tests/misc/cexample_module.py
@@ -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))