Issue #14310: Catch testing errors when trying to create unsupported socket

types on some platforms.
This commit is contained in:
Kristján Valur Jónsson 2012-04-07 20:38:44 +00:00
parent 8798ad3e1e
commit 52a11f1f46
1 changed files with 4 additions and 1 deletions

View File

@ -4735,7 +4735,10 @@ class TestSocketSharing(SocketTCPTest):
types = [socket.SOCK_STREAM, socket.SOCK_DGRAM] types = [socket.SOCK_STREAM, socket.SOCK_DGRAM]
for f in families: for f in families:
for t in types: for t in types:
source = socket.socket(f, t) try:
source = socket.socket(f, t)
except OSError:
continue # This combination is not supported
try: try:
data = source.share(os.getpid()) data = source.share(os.getpid())
shared = socket.fromshare(data) shared = socket.fromshare(data)