bpo-38614: Use test.support.LOOPBACK_TIMEOUT constant (GH-17554)
Replace hardcoded timeout constants in tests with LOOPBACK_TIMEOUT of
test.support, so it's easier to ajdust this timeout for all tests at
once.
diff --git a/Lib/test/test_timeout.py b/Lib/test/test_timeout.py
index 0fe4c7a..ff41b13 100644
--- a/Lib/test/test_timeout.py
+++ b/Lib/test/test_timeout.py
@@ -199,10 +199,7 @@
skip = True
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- # Use a timeout of 3 seconds. Why 3? Because it's more than 1, and
- # less than 5. i.e. no particular reason. Feel free to tweak it if
- # you feel a different value would be more appropriate.
- timeout = 3
+ timeout = support.LOOPBACK_TIMEOUT
sock.settimeout(timeout)
try:
sock.connect((whitehole))