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

Function test_remote_collection

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

Source from the content-addressed store, hash-verified

246
247
248def test_remote_collection(testrepo: Repository) -> None:
249 remote = testrepo.remotes['origin']
250 assert REMOTE_NAME == remote.name
251 assert REMOTE_URL == remote.url
252
253 with pytest.raises(KeyError):
254 testrepo.remotes['upstream']
255
256 name = 'upstream'
257 url = 'https://github.com/libgit2/pygit2.git'
258 remote = testrepo.remotes.create(name, url)
259 assert remote.name in testrepo.remotes.names()
260 assert remote.name in [x.name for x in testrepo.remotes]
261
262
263@utils.requires_refcount

Callers

nothing calls this directly

Calls 2

namesMethod · 0.80
createMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…