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

Function test_create_note

test/test_note.py:48–57  ·  view source on GitHub ↗
(barerepo: Repository)

Source from the content-addressed store, hash-verified

46
47
48def test_create_note(barerepo: Repository) -> None:
49 annotated_id = barerepo.revparse_single('HEAD~3').id
50 author = committer = Signature('Foo bar', 'foo@bar.com', 12346, 0)
51 note_id = barerepo.create_note(NOTE[1], author, committer, str(annotated_id))
52 assert NOTE[0] == note_id
53
54 note = barerepo[note_id]
55 assert isinstance(note, Blob)
56 # check the note blob
57 assert NOTE[1].encode() == note.data
58
59
60def test_lookup_note(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…