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

Method fetch_file

Lib/test/test_httpservers.py:1513–1516  ·  view source on GitHub ↗
(self, path, context=None)

Source from the content-addressed store, hash-verified

1511 f.write(self.tls_password)
1512
1513 def fetch_file(self, path, context=None):
1514 req = urllib.request.Request(path, method='GET')
1515 with urllib.request.urlopen(req, context=context) as res:
1516 return res.read()
1517
1518 def parse_cli_output(self, output):
1519 match = re.search(r'Serving (HTTP|HTTPS) on (.+) port (\d+)', output)

Callers 2

test_http_clientMethod · 0.95
test_https_clientMethod · 0.95

Calls 2

urlopenMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected