Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 52a11f1

Browse files
author
Kristján Valur Jónsson
committed
Issue #14310: Catch testing errors when trying to create unsupported socket
types on some platforms.
1 parent 8798ad3 commit 52a11f1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/test/test_socket.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4735,7 +4735,10 @@ def testTypes(self):
47354735
types = [socket.SOCK_STREAM, socket.SOCK_DGRAM]
47364736
for f in families:
47374737
for t in types:
4738-
source = socket.socket(f, t)
4738+
try:
4739+
source = socket.socket(f, t)
4740+
except OSError:
4741+
continue # This combination is not supported
47394742
try:
47404743
data = source.share(os.getpid())
47414744
shared = socket.fromshare(data)

0 commit comments

Comments
 (0)