1 parent 7dc2345 commit 7f0e563Copy full SHA for 7f0e563
2 files changed
tests/micropython/opt_level.py
@@ -0,0 +1,14 @@
1
+import micropython as micropython
2
+
3
+# check we can get and set the level
4
+micropython.opt_level(0)
5
+print(micropython.opt_level())
6
+micropython.opt_level(1)
7
8
9
+# check that the optimisation levels actually differ
10
11
+exec('print(__debug__)')
12
13
14
+exec('assert 0')
tests/micropython/opt_level.py.exp
@@ -0,0 +1,4 @@
+0
+1
+True
+False
0 commit comments