This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients martin.panter, vstinner
Date 2016-04-14.14:57:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1460645821.85.0.313007784086.issue26757@psf.upfronthosting.co.za>
In-reply-to
Content
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())
History
Date User Action Args
2016-04-14 14:57:01vstinnersetrecipients: + vstinner, martin.panter
2016-04-14 14:57:01vstinnersetmessageid: <1460645821.85.0.313007784086.issue26757@psf.upfronthosting.co.za>
2016-04-14 14:57:01vstinnerlinkissue26757 messages
2016-04-14 14:57:01vstinnercreate