Kaydet (Commit) 9a46eb7c authored tarafından Victor Stinner's avatar Victor Stinner

ssue #23881: ftp://gatekeeper.research.compaq.com/ and ftp://ftp.debian.org/

are down, don't use anymore in test_urllib2net

ftp.kernel.org is also slow or down, so reuse the same FTP servers than Python
3.4 and 3.5: use ftp.debian.org instead.
üst 5ab1c01b
...@@ -102,11 +102,9 @@ class OtherNetworkTests(unittest.TestCase): ...@@ -102,11 +102,9 @@ class OtherNetworkTests(unittest.TestCase):
def test_ftp(self): def test_ftp(self):
urls = [ urls = [
'ftp://ftp.kernel.org/pub/linux/kernel/README', 'ftp://ftp.debian.org/debian/README',
'ftp://ftp.kernel.org/pub/linux/kernel/non-existent-file', ('ftp://ftp.debian.org/debian/non-existent-file',
#'ftp://ftp.kernel.org/pub/leenox/kernel/test', None, urllib2.URLError),
'ftp://gatekeeper.research.compaq.com/pub/DEC/SRC'
'/research-reports/00README-Legal-Rules-Regs',
] ]
self._test_urls(urls, self._extra_handlers()) self._test_urls(urls, self._extra_handlers())
...@@ -284,7 +282,7 @@ class TimeoutTest(unittest.TestCase): ...@@ -284,7 +282,7 @@ class TimeoutTest(unittest.TestCase):
u = _urlopen_with_retry(url, timeout=120) u = _urlopen_with_retry(url, timeout=120)
self.assertEqual(u.fp._sock.fp._sock.gettimeout(), 120) self.assertEqual(u.fp._sock.fp._sock.gettimeout(), 120)
FTP_HOST = "ftp://ftp.mirror.nl/pub/gnu/" FTP_HOST = 'ftp://ftp.debian.org/debian/'
def test_ftp_basic(self): def test_ftp_basic(self):
self.assertIsNone(socket.getdefaulttimeout()) self.assertIsNone(socket.getdefaulttimeout())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment