summaryrefslogtreecommitdiff
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 71837143c5..b3632e9af9 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -5343,7 +5343,11 @@ class LinuxKernelCryptoAPI(unittest.TestCase):
# tests for AF_ALG
def create_alg(self, typ, name):
sock = socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0)
- sock.bind((typ, name))
+ try:
+ sock.bind((typ, name))
+ except FileNotFoundError as e:
+ # type / algorithm is not available
+ raise unittest.SkipTest(str(e), typ, name)
return sock
def test_sha256(self):