From 381cd730c834a1d071e7e90787ef7354b8532142 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sun, 14 Sep 2025 11:51:36 +1000 Subject: tests/micropython: Improve skipping of tests using micropython module. Signed-off-by: Damien George --- tests/micropython/heapalloc_inst_call.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/micropython/heapalloc_inst_call.py') diff --git a/tests/micropython/heapalloc_inst_call.py b/tests/micropython/heapalloc_inst_call.py index 14d8826bf..f78aa3cf8 100644 --- a/tests/micropython/heapalloc_inst_call.py +++ b/tests/micropython/heapalloc_inst_call.py @@ -1,6 +1,13 @@ # Test that calling clazz.__call__() with up to at least 3 arguments # doesn't require heap allocation. -import micropython + +try: + import micropython + + micropython.heap_lock +except (ImportError, AttributeError): + print("SKIP") + raise SystemExit class Foo0: -- cgit v1.2.3