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

Function test_submodule_open_from_repository_subclass

test/test_submodule.py:99–109  ·  view source on GitHub ↗
(repo: Repository)

Source from the content-addressed store, hash-verified

97
98@utils.requires_network
99def test_submodule_open_from_repository_subclass(repo: Repository) -> None:
100 class CustomRepoClass(pygit2.Repository):
101 pass
102
103 custom_repo = CustomRepoClass(repo.workdir)
104 s = custom_repo.submodules[SUBM_PATH]
105 custom_repo.submodules.init()
106 custom_repo.submodules.update()
107 r = s.open()
108 assert isinstance(r, CustomRepoClass)
109 assert r.head.target == SUBM_HEAD_SHA
110
111
112def test_name(repo: Repository) -> None:

Callers

nothing calls this directly

Calls 4

CustomRepoClassClass · 0.85
openMethod · 0.80
initMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…