summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2016-09-06 09:14:09 (GMT)
committerChristian Heimes <christian@python.org>2016-09-06 09:14:09 (GMT)
commit407380f63f9f831e0cd445ba8527d3d195f478ed (patch)
tree581eb6de3847427fd66b77298968209aa5c1b37a /Lib/test/test_socket.py
parentea9b2dc9e392d46eb4d698a731b271f429d19876 (diff)
downloadcpython-407380f63f9f831e0cd445ba8527d3d195f478ed.zip
cpython-407380f63f9f831e0cd445ba8527d3d195f478ed.tar.gz
cpython-407380f63f9f831e0cd445ba8527d3d195f478ed.tar.bz2
Issue 27744: skip test if AF_ALG socket bind fails
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 7183714..b3632e9 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):