Commit Graph

3 Commits (jebbatime)

Author SHA1 Message Date
Damien George 791b65f4b2 py/modmicropython: Add micropython.const, alias for identity function.
Having a micropython.const identity function, and writing "from micropython
import const" at the start of scripts that use the const feature, allows to
write scripts which are compatible with CPython, and with uPy builds that
don't include const optimisation.

This patch adds such a function and updates the tests to do the import.
2016-09-27 13:34:21 +10:00
Damien George 214179b430 tests: Add tests for SyntaxError, TypeError, and other missing things.
This is intended to improve coverage of the test suite.
2015-03-25 23:10:09 +00:00
Damien George 47538cc880 tests: Add test for micropython const feature when it has a SyntaxError. 2015-03-01 12:06:24 +00:00