circuitpython/tests/feature_check/native_check.py
Damien George 8459f538eb tests/feature_check: Check for lack of pass result rather than failure.
Commit cb68a5741a broke automatic Python
feature detection when running tests, because some detection relied on a
crash of a feature script returning exactly b"CRASH".

This commit fixes this and improves the situation by testing for the lack
of a known pass result, rather than an exact failure result.

Signed-off-by: Damien George <damien@micropython.org>
2021-04-15 00:52:56 +10:00

9 lines
111 B
Python

# this test for the availability of native emitter
@micropython.native
def f():
pass
f()
print("native")