MCPcopy
hub / github.com/pytest-dev/pytest / get_data

Method get_data

src/_pytest/assertion/rewrite.py:291–294  ·  src/_pytest/assertion/rewrite.py::AssertionRewritingHook.get_data

Optional PEP302 get_data API.

(self, pathname: str | bytes)

Source from the content-addressed store, hash-verified

289 )
290
291 def get_data(self, pathname: str | bytes) -> bytes:
292 class="st">""class="st">"Optional PEP302 get_data API."class="st">""
293 with open(pathname, class="st">"rb") as f:
294 return f.read()
295
296 def get_resource_reader(self, name: str) -> TraversableResources:
297 return FileReader(types.SimpleNamespace(path=self._rewritten_names[name])) class="cm"># type: ignore[arg-type]

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected