bpo-38614: Use test.support.INTERNET_TIMEOUT constant (GH-17565)
Replace hardcoded timeout constants in tests with INTERNET_TIMEOUT of
test.support, so it's easier to ajdust this timeout for all tests at
once.
diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py
index bb0500e..b3a5e89 100644
--- a/Lib/test/test_urllib2net.py
+++ b/Lib/test/test_urllib2net.py
@@ -10,8 +10,6 @@
support.requires("network")
-TIMEOUT = 60 # seconds
-
def _retry_thrice(func, exc, *args, **kwargs):
for i in range(3):
@@ -227,7 +225,7 @@
with support.transient_internet(url):
try:
- f = urlopen(url, req, TIMEOUT)
+ f = urlopen(url, req, support.INTERNET_TIMEOUT)
# urllib.error.URLError is a subclass of OSError
except OSError as err:
if expected_err: