[Python-checkins] cpython: Issue 27744: skip test if AF_ALG socket bind fails
christian.heimes
python-checkins at python.org
Tue Sep 6 05:14:18 EDT 2016
https://hg.python.org/cpython/rev/e3b83bfa02c5
changeset: 103115:e3b83bfa02c5
user: Christian Heimes <christian at python.org>
date: Tue Sep 06 11:14:09 2016 +0200
summary:
Issue 27744: skip test if AF_ALG socket bind fails
files:
Lib/test/test_socket.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -5343,7 +5343,11 @@
# 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):
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list