summaryrefslogtreecommitdiff
path: root/tests/micropython/opt_level_lineno.py
blob: 00e5739605754ca6396fc70e5ab19912024c4535 (plain)
1
2
3
4
5
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)')