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

Function test_repr

test/test_signature.py:63–69  ·  view source on GitHub ↗
(encoding: str | None)

Source from the content-addressed store, hash-verified

61
62@pytest.mark.parametrize('encoding', [None, 'utf-8', 'iso-8859-1'])
63def test_repr(encoding: str | None) -> None:
64 signature = pygit2.Signature(
65 'Foo Ibáñez', 'foo@bar.com', 1322174594, 60, encoding=encoding
66 )
67 expected = f"pygit2.Signature('Foo Ibáñez', 'foo@bar.com', 1322174594, 60, {repr(encoding)})"
68 assert repr(signature) == expected
69 assert signature == eval(expected)
70
71
72def test_repr_from_commit(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…