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

Function test_read_header

test/test_odb.py:92–101  ·  view source on GitHub ↗
(odb: Odb)

Source from the content-addressed store, hash-verified

90
91
92def test_read_header(odb: Odb) -> None:
93 with pytest.raises(TypeError):
94 odb.read_header(123) # type: ignore
95 utils.assertRaisesWithArg(KeyError, '1' * 40, odb.read_header, '1' * 40)
96
97 ab = odb.read_header(BLOB_OID)
98 a = odb.read_header(BLOB_HEX)
99 assert ab == a
100 assert (ObjectType.BLOB, len(BLOB_CONTENTS)) == a
101 assert isinstance(a[0], ObjectType)
102
103
104def test_write(odb: Odb) -> 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…