summaryrefslogtreecommitdiff
path: root/tests/micropython
diff options
context:
space:
mode:
Diffstat (limited to 'tests/micropython')
-rw-r--r--tests/micropython/opt_level.py5
-rw-r--r--tests/micropython/opt_level.py.exp3
-rw-r--r--tests/micropython/opt_level_lineno.py6
-rw-r--r--tests/micropython/opt_level_lineno.py.exp3
4 files changed, 9 insertions, 8 deletions
diff --git a/tests/micropython/opt_level.py b/tests/micropython/opt_level.py
index 5a10047f0..4e2f2f4ea 100644
--- a/tests/micropython/opt_level.py
+++ b/tests/micropython/opt_level.py
@@ -12,8 +12,3 @@ exec('print(__debug__)')
micropython.opt_level(1)
exec('print(__debug__)')
exec('assert 0')
-
-# check that level 3 doesn't store line numbers
-# the expected output is that any line is printed as "line 1"
-micropython.opt_level(3)
-exec('try:\n xyz\nexcept NameError as er:\n import sys\n sys.print_exception(er)')
diff --git a/tests/micropython/opt_level.py.exp b/tests/micropython/opt_level.py.exp
index 6372f6c5d..74b3dd74e 100644
--- a/tests/micropython/opt_level.py.exp
+++ b/tests/micropython/opt_level.py.exp
@@ -2,6 +2,3 @@
1
True
False
-Traceback (most recent call last):
- File "<string>", line 1, in <module>
-NameError: name 'xyz' isn't defined
diff --git a/tests/micropython/opt_level_lineno.py b/tests/micropython/opt_level_lineno.py
new file mode 100644
index 000000000..00e573960
--- /dev/null
+++ b/tests/micropython/opt_level_lineno.py
@@ -0,0 +1,6 @@
+import micropython as micropython
+
+# check that level 3 doesn't store line numbers
+# the expected output is that any line is printed as "line 1"
+micropython.opt_level(3)
+exec('try:\n xyz\nexcept NameError as er:\n import sys\n sys.print_exception(er)')
diff --git a/tests/micropython/opt_level_lineno.py.exp b/tests/micropython/opt_level_lineno.py.exp
new file mode 100644
index 000000000..469b90ba7
--- /dev/null
+++ b/tests/micropython/opt_level_lineno.py.exp
@@ -0,0 +1,3 @@
+Traceback (most recent call last):
+ File "<string>", line 1, in <module>
+NameError: name 'xyz' isn't defined