Message263413
It looks deliberate to test the HTTP query with *no* timeout. Sadly, it looks like it's ok that an HTTP query takes longer than 15 minutes!
Can't we mock the query to only test that the socket timeout is None? Move the test from test_urllib2net to test_urllib2.
class TimeoutTest(unittest.TestCase):
def test_http_basic(self):
self.assertIsNone(socket.getdefaulttimeout())
url = "http://www.example.com"
with support.transient_internet(url, timeout=None):
u = _urlopen_with_retry(url)
self.addCleanup(u.close)
self.assertIsNone(u.fp.raw._sock.gettimeout()) |
|
Date |
User |
Action |
Args |
2016-04-14 14:57:01 | vstinner | set | recipients:
+ vstinner, martin.panter |
2016-04-14 14:57:01 | vstinner | set | messageid: <1460645821.85.0.313007784086.issue26757@psf.upfronthosting.co.za> |
2016-04-14 14:57:01 | vstinner | link | issue26757 messages |
2016-04-14 14:57:01 | vstinner | create | |
|