tests/net_inet: Skip tests on axTLS when necessary.

These tests cannot run with axTLS, eg on esp8266.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2025-07-31 12:24:51 +10:00
parent 6fef4eb55c
commit a3867590f9
5 changed files with 22 additions and 0 deletions

View File

@@ -2,6 +2,10 @@ import ssl
import os
import asyncio
if not hasattr(ssl, "CERT_REQUIRED"):
print("SKIP")
raise SystemExit
# This certificate was obtained from micropython.org using openssl:
# $ openssl s_client -showcerts -connect micropython.org:443 </dev/null 2>/dev/null
# The certificate is from Let's Encrypt:

View File

@@ -1,6 +1,9 @@
import socket
import ssl
if not hasattr(ssl, "CERT_REQUIRED"):
print("SKIP")
raise SystemExit
# This certificate was obtained from micropython.org using openssl:
# $ openssl s_client -showcerts -connect micropython.org:443 </dev/null 2>/dev/null

View File

@@ -3,6 +3,10 @@
import sys, errno, select, socket, ssl
if not hasattr(ssl, "CERT_REQUIRED"):
print("SKIP")
raise SystemExit
def test(addr, hostname, block=True):
print("---", hostname)

View File

@@ -2,6 +2,10 @@ import os
import socket
import ssl
if not hasattr(ssl, "CERT_REQUIRED"):
print("SKIP")
raise SystemExit
# This certificate was obtained from micropython.org using openssl:
# $ openssl s_client -showcerts -connect micropython.org:443 </dev/null 2>/dev/null
# The certificate is from Let's Encrypt:

View File

@@ -1,5 +1,12 @@
import socket, ssl, errno, sys, time, select
# Although this test doesn't need ssl.CERT_REQUIRED, it does require the ssl module
# to support modern ciphers. So exclude the test on axTLS which doesn't have
# CERT_REQUIRED.
if not hasattr(ssl, "CERT_REQUIRED"):
print("SKIP")
raise SystemExit
def test_one(site, opts):
ai = socket.getaddrinfo(site, 443, socket.AF_INET)