PythonExtra/tests/micropython/opt_level_lineno.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

7 lines
255 B
Python
Raw Permalink Normal View History

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 usys\n usys.print_exception(er)")