bpo-40275: Fix name error in support.socket_helper (GH-19825) · python/cpython@2935e65

@@ -91,13 +91,15 @@ def bind_port(sock, host=HOST):

9191

if sock.family == socket.AF_INET and sock.type == socket.SOCK_STREAM:

9292

if hasattr(socket, 'SO_REUSEADDR'):

9393

if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) == 1:

94-

raise TestFailed("tests should never set the SO_REUSEADDR " \

95-

"socket option on TCP/IP sockets!")

94+

raise support.TestFailed("tests should never set the "

95+

"SO_REUSEADDR socket option on "

96+

"TCP/IP sockets!")

9697

if hasattr(socket, 'SO_REUSEPORT'):

9798

try:

9899

if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT) == 1:

99-

raise TestFailed("tests should never set the SO_REUSEPORT " \

100-

"socket option on TCP/IP sockets!")

100+

raise support.TestFailed("tests should never set the "

101+

"SO_REUSEPORT socket option on "

102+

"TCP/IP sockets!")

101103

except OSError:

102104

# Python's socket module was compiled using modern headers

103105

# thus defining SO_REUSEPORT but this process is running