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

Function test_modify_commit

test/test_commit.py:137–153  ·  view source on GitHub ↗
(barerepo: Repository)

Source from the content-addressed store, hash-verified

135
136
137def test_modify_commit(barerepo: Repository) -> None:
138 message = 'New commit.\n\nMessage.\n'
139 committer = ('John Doe', 'jdoe@example.com', 12346)
140 author = ('Jane Doe', 'jdoe2@example.com', 12345)
141
142 commit = barerepo[COMMIT_SHA]
143
144 with pytest.raises(AttributeError):
145 setattr(commit, 'message', message)
146 with pytest.raises(AttributeError):
147 setattr(commit, 'committer', committer)
148 with pytest.raises(AttributeError):
149 setattr(commit, 'author', author)
150 with pytest.raises(AttributeError):
151 setattr(commit, 'tree', None)
152 with pytest.raises(AttributeError):
153 setattr(commit, 'parents', None)
154
155
156def test_amend_commit_metadata(barerepo: 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…