Skip to content

Commit 47538cc

Browse files
committed
tests: Add test for micropython const feature when it has a SyntaxError.
1 parent 62a3a28 commit 47538cc

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

tests/micropython/const_error.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# make sure syntax error works corrects for bad const definition
2+
3+
try:
4+
exec("a = const(x)")
5+
except SyntaxError:
6+
print("SyntaxError")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SyntaxError

0 commit comments

Comments
 (0)