MCPcopy Index your code
hub / github.com/python/cpython / testURLread

Method testURLread

Lib/test/test_urllibnet.py:28–35  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

26 socket.setdefaulttimeout(None)
27
28 def testURLread(self):
29 # clear _opener global variable
30 self.addCleanup(urllib.request.urlcleanup)
31
32 domain = urllib.parse.urlparse(support.TEST_HTTP_URL).netloc
33 with socket_helper.transient_internet(domain):
34 f = urllib.request.urlopen(support.TEST_HTTP_URL)
35 f.read()
36
37
38class urlopenNetworkTests(unittest.TestCase):

Callers

nothing calls this directly

Calls 3

addCleanupMethod · 0.80
urlopenMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected