You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
280 B
11 lines
280 B
# test syntax errors for uPy-specific decorators
|
|
|
|
def test_syntax(code):
|
|
try:
|
|
exec(code)
|
|
except SyntaxError:
|
|
print("SyntaxError")
|
|
|
|
# invalid micropython decorators
|
|
test_syntax("@micropython.a\ndef f(): pass")
|
|
test_syntax("@micropython.a.b\ndef f(): pass")
|
|
|