mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
When `MICROPY_PYEXEC_COMPILE_ONLY` is enabled and the global `mp_compile_only` is True, code is compiled but not executed. Also add comprehensive tests for compile-only functionality covering both successful compilation and syntax error detection. Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
7 lines
173 B
Python
7 lines
173 B
Python
# cmdline: -X compile-only
|
|
# test compile-only with syntax error
|
|
print("This should not be printed")
|
|
def broken_syntax(
|
|
# Missing closing parenthesis
|
|
return "error"
|