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

Method test_basic

Lib/test/test_urllib2_localnet.py:605–610  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

603 self.assertNotIn("X-SoMe-hEader", handler.headers_received.keys())
604
605 def test_basic(self):
606 handler = self.start_server()
607 with urllib.request.urlopen("http://localhost:%s" % handler.port) as open_url:
608 for attr in ("read", "close", "info", "geturl"):
609 self.assertHasAttr(open_url, attr)
610 self.assertTrue(open_url.read(), "calling 'read' failed")
611
612 def test_info(self):
613 handler = self.start_server()

Callers

nothing calls this directly

Calls 5

start_serverMethod · 0.95
assertHasAttrMethod · 0.80
assertTrueMethod · 0.80
urlopenMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected