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

Function test_http_client

Lib/test/audit-tests.py:440–455  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

438
439
440def test_http_client():
441 import http.client
442
443 def hook(event, args):
444 if event.startswith("http.client."):
445 print(event, *args[1:])
446
447 sys.addaudithook(hook)
448
449 conn = http.client.HTTPConnection('www.python.org')
450 try:
451 conn.request('GET', '/')
452 except OSError:
453 print('http.client.send', '[cannot send]')
454 finally:
455 conn.close()
456
457
458def test_sqlite3():

Callers

nothing calls this directly

Calls 2

requestMethod · 0.95
closeMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…