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_int_from_bytes.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/micropython/heapalloc_int_from_bytes.py') diff --git a/tests/micropython/heapalloc_int_from_bytes.py b/tests/micropython/heapalloc_int_from_bytes.py index 5fe50443a..3310ea95d 100644 --- a/tests/micropython/heapalloc_int_from_bytes.py +++ b/tests/micropython/heapalloc_int_from_bytes.py @@ -1,6 +1,13 @@ # Test that int.from_bytes() for small number of bytes generates # small int. -import micropython + +try: + import micropython + + micropython.heap_lock +except (ImportError, AttributeError): + print("SKIP") + raise SystemExit micropython.heap_lock() print(int.from_bytes(b"1", "little")) -- cgit v1.2.3