mirror of https://github.com/python/cpython
Issue 27744: skip test if AF_ALG socket bind fails
This commit is contained in:
parent
ea9b2dc9e3
commit
407380f63f
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue