diff options
Diffstat (limited to 'tests/micropython/heapalloc_exc_raise.py')
-rw-r--r-- | tests/micropython/heapalloc_exc_raise.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/micropython/heapalloc_exc_raise.py b/tests/micropython/heapalloc_exc_raise.py index 99810e007..917ccf42f 100644 --- a/tests/micropython/heapalloc_exc_raise.py +++ b/tests/micropython/heapalloc_exc_raise.py @@ -1,6 +1,12 @@ # Test that we can raise and catch (preallocated) exception # without memory allocation. -import micropython +try: + import micropython + + micropython.heap_lock +except (ImportError, AttributeError): + print("SKIP") + raise SystemExit e = ValueError("error") |