diff options
author | Damien George <damien.p.george@gmail.com> | 2015-03-01 12:06:24 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-03-01 12:06:24 +0000 |
commit | 47538cc880e3699fcef3f8a9ff4c8c76fa455795 (patch) | |
tree | 4427679dd3d8a933a383a1aa50bf222622d8844a | |
parent | 62a3a287d9aca9a8552671257c5b989c32a97d6f (diff) | |
download | micropython-47538cc880e3699fcef3f8a9ff4c8c76fa455795.tar.gz micropython-47538cc880e3699fcef3f8a9ff4c8c76fa455795.zip |
tests: Add test for micropython const feature when it has a SyntaxError.
-rw-r--r-- | tests/micropython/const_error.py | 6 | ||||
-rw-r--r-- | tests/micropython/const_error.py.exp | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/micropython/const_error.py b/tests/micropython/const_error.py new file mode 100644 index 0000000000..fa7deaaf31 --- /dev/null +++ b/tests/micropython/const_error.py @@ -0,0 +1,6 @@ +# make sure syntax error works corrects for bad const definition + +try: + exec("a = const(x)") +except SyntaxError: + print("SyntaxError") diff --git a/tests/micropython/const_error.py.exp b/tests/micropython/const_error.py.exp new file mode 100644 index 0000000000..8729fc4343 --- /dev/null +++ b/tests/micropython/const_error.py.exp @@ -0,0 +1 @@ +SyntaxError |