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

Function test_equality

test/test_object.py:42–50  ·  view source on GitHub ↗
(testrepo: Repository)

Source from the content-addressed store, hash-verified

40
41
42def test_equality(testrepo: Repository) -> None:
43 # get a commit object twice and see if it equals ittestrepo
44 commit_id = testrepo.lookup_reference('refs/heads/master').target
45 commit_a = testrepo[commit_id]
46 commit_b = testrepo[commit_id]
47
48 assert commit_a is not commit_b
49 assert commit_a == commit_b
50 assert not (commit_a != commit_b)
51
52
53def test_hashing(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…