summaryrefslogtreecommitdiff
path: root/Lib/test/test_timeout.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2019-12-10 20:32:59 +0100
committerGitHub <noreply@github.com>2019-12-10 20:32:59 +0100
commit07871b256c76ca561554d1f82b430fc64a5c7ee0 (patch)
tree2870562d7cf2df7448eb5a16aedb00f2ec3f34ee /Lib/test/test_timeout.py
parent680068c28896baba36fa7361976e07bb0f588561 (diff)
downloadcpython-git-07871b256c76ca561554d1f82b430fc64a5c7ee0.tar.gz
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.
Diffstat (limited to 'Lib/test/test_timeout.py')
-rw-r--r--Lib/test/test_timeout.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/test/test_timeout.py b/Lib/test/test_timeout.py
index 0fe4c7ab6e..ff41b13a6c 100644
--- a/Lib/test/test_timeout.py
+++ b/Lib/test/test_timeout.py
@@ -199,10 +199,7 @@ class TCPTimeoutTestCase(TimeoutTestCase):
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))