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

Function test_create_blob_fromworkdir

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

Source from the content-addressed store, hash-verified

118
119
120def test_create_blob_fromworkdir(testrepo: Repository) -> None:
121 blob_oid = testrepo.create_blob_fromworkdir('bye.txt')
122 blob = testrepo[blob_oid]
123
124 assert isinstance(blob, pygit2.Blob)
125 assert ObjectType.BLOB == blob.type
126
127 assert blob_oid == blob.id
128 assert utils.gen_blob_sha1(BLOB_FILE_CONTENT) == blob_oid
129
130 assert BLOB_FILE_CONTENT == blob.data
131 assert len(BLOB_FILE_CONTENT) == blob.size
132 assert BLOB_FILE_CONTENT == blob.read_raw()
133
134
135def test_create_blob_fromworkdir_aspath(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…