(testrepo: Repository)
| 48 | |
| 49 | |
| 50 | def test_remote_create(testrepo: Repository) -> None: |
| 51 | name = 'upstream' |
| 52 | url = 'https://github.com/libgit2/pygit2.git' |
| 53 | |
| 54 | remote = testrepo.remotes.create(name, url) |
| 55 | |
| 56 | assert type(remote) is pygit2.Remote |
| 57 | assert name == remote.name |
| 58 | assert url == remote.url |
| 59 | assert remote.push_url is None |
| 60 | |
| 61 | with pytest.raises(ValueError): |
| 62 | testrepo.remotes.create(*(name, url)) |
| 63 | |
| 64 | |
| 65 | def test_remote_create_with_refspec(testrepo: Repository) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…