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

Function test_remote_set_url

test/test_remote.py:117–133  ·  view source on GitHub ↗
(testrepo: Repository)

Source from the content-addressed store, hash-verified

115
116
117def test_remote_set_url(testrepo: Repository) -> None:
118 remote = testrepo.remotes['origin']
119 assert REMOTE_URL == remote.url
120
121 new_url = 'https://github.com/cholin/pygit2.git'
122 testrepo.remotes.set_url('origin', new_url)
123 remote = testrepo.remotes['origin']
124 assert new_url == remote.url
125
126 with pytest.raises(ValueError):
127 testrepo.remotes.set_url('origin', '')
128
129 testrepo.remotes.set_push_url('origin', new_url)
130 remote = testrepo.remotes['origin']
131 assert new_url == remote.push_url
132 with pytest.raises(ValueError):
133 testrepo.remotes.set_push_url('origin', '')
134
135
136def test_refspec(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls 2

set_urlMethod · 0.80
set_push_urlMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…