summaryrefslogtreecommitdiff
path: root/Lib/test/support
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2020-04-30 20:59:30 -0700
committerGuido van Rossum <guido@python.org>2020-04-30 20:59:30 -0700
commit0be7a2bb0c0c4f7a1317338726176eb267a1c709 (patch)
treea379628b6ff449cddc9d4953ecb869d7fa434639 /Lib/test/support
parentc73ab8934487d0dc88ce4a8ed230bae100ff3776 (diff)
parent3e0a6f37dfdd595be737baae00ec0e036a912615 (diff)
downloadcpython-git-refactor-lambda-parameters.tar.gz
Merge remote-tracking branch 'origin/master' into refactor-lambda-parametersrefactor-lambda-parameters
Diffstat (limited to 'Lib/test/support')
-rw-r--r--Lib/test/support/socket_helper.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/test/support/socket_helper.py b/Lib/test/support/socket_helper.py
index 0ac8445562..f709ffd40d 100644
--- a/Lib/test/support/socket_helper.py
+++ b/Lib/test/support/socket_helper.py
@@ -91,13 +91,15 @@ def bind_port(sock, host=HOST):
if sock.family == socket.AF_INET and sock.type == socket.SOCK_STREAM:
if hasattr(socket, 'SO_REUSEADDR'):
if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) == 1:
- raise TestFailed("tests should never set the SO_REUSEADDR " \
- "socket option on TCP/IP sockets!")
+ raise support.TestFailed("tests should never set the "
+ "SO_REUSEADDR socket option on "
+ "TCP/IP sockets!")
if hasattr(socket, 'SO_REUSEPORT'):
try:
if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT) == 1:
- raise TestFailed("tests should never set the SO_REUSEPORT " \
- "socket option on TCP/IP sockets!")
+ raise support.TestFailed("tests should never set the "
+ "SO_REUSEPORT socket option on "
+ "TCP/IP sockets!")
except OSError:
# Python's socket module was compiled using modern headers
# thus defining SO_REUSEPORT but this process is running