diff options
author | Damien George <damien@micropython.org> | 2025-08-15 13:33:02 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2025-08-28 23:19:20 +1000 |
commit | af745a5982b5be41c8e74d12c70a3b281eb49328 (patch) | |
tree | 5430c8dfd39cb98b5b9083db8e2bcd19cfc3b8be /tests | |
parent | dbbc7d96672bb44a04f27fef32231dd7340d7952 (diff) |
tests/net_inet/tls_num_errors.py: Make alloc of emg-exc-buf optional.
The unix port doesn't have `micropython.alloc_emergency_exception_buf()`
but it's still possible to run and pass this test. So make that call
optional.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/net_inet/tls_num_errors.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/net_inet/tls_num_errors.py b/tests/net_inet/tls_num_errors.py index 34aa2bb45..9c12114ea 100644 --- a/tests/net_inet/tls_num_errors.py +++ b/tests/net_inet/tls_num_errors.py @@ -3,15 +3,21 @@ import socket, ssl, sys try: - from micropython import alloc_emergency_exception_buf, heap_lock, heap_unlock + from micropython import heap_lock, heap_unlock except: print("SKIP") raise SystemExit +try: + from micropython import alloc_emergency_exception_buf + + alloc_emergency_exception_buf(256) +except: + pass + # test with heap locked to see it switch to number-only error message def test(addr): - alloc_emergency_exception_buf(256) s = socket.socket() s.connect(addr) try: |