MCPcopy Create free account
hub / github.com/apache/tvm / _testing_docker_api

Function _testing_docker_api

ci/scripts/jenkins/open_docker_update_pr.py:42–51  ·  view source on GitHub ↗

Returns a function that can be used in place of docker_api

(data: dict[str, Any])

Source from the content-addressed store, hash-verified

40
41
42def _testing_docker_api(data: dict[str, Any]) -> Callable[[str], dict[str, Any]]:
43 """Returns a function that can be used in place of docker_api"""
44
45 def mock(url: str) -> dict[str, Any]:
46 if url in data:
47 return data[url]
48 else:
49 raise error.HTTPError(url, 404, f"Not found: {url}", {}, None)
50
51 return mock
52
53
54def parse_docker_date(d: str) -> datetime.datetime:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…