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

Function test_read

test/test_odb_backend.py:114–122  ·  view source on GitHub ↗
(proxy: ProxyBackend)

Source from the content-addressed store, hash-verified

112
113
114def test_read(proxy: ProxyBackend) -> None:
115 with pytest.raises(TypeError):
116 proxy.read(123) # type: ignore
117 utils.assertRaisesWithArg(KeyError, '1' * 40, proxy.read, '1' * 40)
118
119 ab = proxy.read(BLOB_OID)
120 a = proxy.read(BLOB_HEX)
121 assert ab == a
122 assert (ObjectType.BLOB, b'a contents\n') == a
123
124
125def test_read_prefix(proxy: ProxyBackend) -> 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…