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

Function test_repr_from_commit

test/test_signature.py:72–81  ·  view source on GitHub ↗
(barerepo: Repository)

Source from the content-addressed store, hash-verified

70
71
72def test_repr_from_commit(barerepo: Repository) -> None:
73 repo = barerepo
74 signature = pygit2.Signature('Foo Ibáñez', 'foo@example.com', encoding=None)
75 tree = '967fce8df97cc71722d3c2a5930ef3e6f1d27b12'
76 parents = ['5fe808e8953c12735680c257f56600cb0de44b10']
77 sha = repo.create_commit(None, signature, signature, 'New commit.', tree, parents)
78 commit = repo[sha]
79
80 assert repr(signature) == repr(commit.author)
81 assert repr(signature) == repr(commit.committer)
82
83
84def test_incorrect_encoding() -> 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…