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

Function test_set_url

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

Source from the content-addressed store, hash-verified

125
126
127def test_set_url(repo: Repository) -> None:
128 new_url = 'ssh://git@127.0.0.1:2222/my_repo'
129 s = repo.submodules[SUBM_PATH]
130 s.url = new_url
131 assert new_url == repo.submodules[SUBM_PATH].url
132 # Ensure .gitmodules has been correctly altered
133 with open(Path(repo.workdir, '.gitmodules'), 'r') as fd:
134 modules = fd.read()
135 assert new_url in modules
136
137
138def test_missing_url(repo: Repository) -> None:

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…