summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllibnet.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2019-12-10 21:09:23 (GMT)
committerGitHub <noreply@github.com>2019-12-10 21:09:23 (GMT)
commit1d0f9b316a290f0e1f330fdbceb027deb96ce109 (patch)
treeaa11a994386b9fb60f07d161810a4c4399775a03 /Lib/test/test_urllibnet.py
parentc98b0199a984430312833ef403d265be314f7244 (diff)
downloadcpython-1d0f9b316a290f0e1f330fdbceb027deb96ce109.zip
cpython-1d0f9b316a290f0e1f330fdbceb027deb96ce109.tar.gz
cpython-1d0f9b316a290f0e1f330fdbceb027deb96ce109.tar.bz2
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.
Diffstat (limited to 'Lib/test/test_urllibnet.py')
-rw-r--r--Lib/test/test_urllibnet.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py
index 848ab84..422d529 100644
--- a/Lib/test/test_urllibnet.py
+++ b/Lib/test/test_urllibnet.py
@@ -16,10 +16,8 @@ support.requires('network')
class URLTimeoutTest(unittest.TestCase):
# XXX this test doesn't seem to test anything useful.
- TIMEOUT = 30.0
-
def setUp(self):
- socket.setdefaulttimeout(self.TIMEOUT)
+ socket.setdefaulttimeout(support.INTERNET_TIMEOUT)
def tearDown(self):
socket.setdefaulttimeout(None)