changeset: 103115:e3b83bfa02c5 user: Christian Heimes date: Tue Sep 06 11:14:09 2016 +0200 files: Lib/test/test_socket.py description: Issue 27744: skip test if AF_ALG socket bind fails diff -r 9377ed49746b -r e3b83bfa02c5 Lib/test/test_socket.py --- a/Lib/test/test_socket.py Tue Sep 06 10:45:44 2016 +0200 +++ b/Lib/test/test_socket.py Tue Sep 06 11:14:09 2016 +0200 @@ -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):