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

Function test_change_attributes

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

Source from the content-addressed store, hash-verified

231
232
233def test_change_attributes(testrepo: Repository) -> None:
234 index = testrepo.index
235 entry = index['hello.txt']
236 ign_entry = index['.gitignore']
237 assert ign_entry.id != entry.id
238 assert entry.mode != FileMode.BLOB_EXECUTABLE
239 entry.path = 'foo.txt'
240 entry.id = ign_entry.id
241 entry.mode = FileMode.BLOB_EXECUTABLE
242 assert 'foo.txt' == entry.path
243 assert ign_entry.id == entry.id
244 assert FileMode.BLOB_EXECUTABLE == entry.mode
245
246
247def test_write_tree_to(testrepo: Repository, tmp_path: Path) -> 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…