circuitpython/tests/micropython/const_error.py

7 lines
141 B
Python

# make sure syntax error works corrects for bad const definition
try:
exec("a = const(x)")
except SyntaxError:
print("SyntaxError")