circuitpython/tests/basics/builtin_eval_error.py

13 lines
182 B
Python
Raw Normal View History

# test if eval raises SyntaxError
try:
eval
except NameError:
print("SKIP")
raise SystemExit
try:
print(eval("[1,,]"))
except SyntaxError:
print("SyntaxError")