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

Function test_entry_eq

test/test_index.py:271–285  ·  view source on GitHub ↗
(testrepo: Repository)

Source from the content-addressed store, hash-verified

269
270
271def test_entry_eq(testrepo: Repository) -> None:
272 index = testrepo.index
273 hello_entry = index['hello.txt']
274 entry = pygit2.IndexEntry(hello_entry.path, hello_entry.id, hello_entry.mode)
275 assert hello_entry == entry
276
277 entry = pygit2.IndexEntry('README.md', hello_entry.id, hello_entry.mode)
278 assert hello_entry != entry
279 oid = Oid(hex='0907563af06c7464d62a70cdd135a6ba7d2b41d8')
280 entry = pygit2.IndexEntry(hello_entry.path, oid, hello_entry.mode)
281 assert hello_entry != entry
282 entry = pygit2.IndexEntry(
283 hello_entry.path, hello_entry.id, FileMode.BLOB_EXECUTABLE
284 )
285 assert hello_entry != entry
286
287
288def test_entry_repr(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…