MCPcopy Create free account
hub / github.com/libgit2/pygit2 / test_blobio

Function test_blobio

test/test_blob.py:253–259  ·  view source on GitHub ↗
(testrepo: Repository)

Source from the content-addressed store, hash-verified

251
252
253def test_blobio(testrepo: Repository) -> None:
254 blob_oid = testrepo.create_blob_fromworkdir('bye.txt')
255 blob = testrepo[blob_oid]
256 assert isinstance(blob, pygit2.Blob)
257 with pygit2.BlobIO(blob) as reader:
258 assert b'bye world\n' == reader.read()
259 assert not reader.raw._thread.is_alive() # type: ignore[attr-defined]
260
261
262def test_blobio_filtered(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…