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

Function test_write

test/test_repository_bare.py:92–99  ·  view source on GitHub ↗
(barerepo: Repository)

Source from the content-addressed store, hash-verified

90
91
92def test_write(barerepo: Repository) -> None:
93 data = b'hello world'
94 # invalid object type
95 with pytest.raises(ValueError):
96 barerepo.write(ObjectType.ANY, data)
97
98 oid = barerepo.write(ObjectType.BLOB, data)
99 assert type(oid) is pygit2.Oid
100
101
102def test_contains(barerepo: Repository) -> None:

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…