From 47538cc880e3699fcef3f8a9ff4c8c76fa455795 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sun, 1 Mar 2015 12:06:24 +0000 Subject: [PATCH] tests: Add test for micropython const feature when it has a SyntaxError. --- tests/micropython/const_error.py | 6 ++++++ tests/micropython/const_error.py.exp | 1 + 2 files changed, 7 insertions(+) create mode 100644 tests/micropython/const_error.py create mode 100644 tests/micropython/const_error.py.exp diff --git a/tests/micropython/const_error.py b/tests/micropython/const_error.py new file mode 100644 index 000000000..fa7deaaf3 --- /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 000000000..8729fc434 --- /dev/null +++ b/tests/micropython/const_error.py.exp @@ -0,0 +1 @@ +SyntaxError