(tmp_path: Path)
| 780 | |
| 781 | @utils.requires_network |
| 782 | def test_clone_bad_credentials(tmp_path: Path) -> None: |
| 783 | class MyCallbacks(pygit2.RemoteCallbacks): |
| 784 | def credentials( |
| 785 | self, |
| 786 | url: str, |
| 787 | username_from_url: str | None, |
| 788 | allowed_types: CredentialType, |
| 789 | ) -> Username | UserPass | Keypair: |
| 790 | raise RuntimeError('Unexpected error') |
| 791 | |
| 792 | url = 'https://github.com/github/github' |
| 793 | with pytest.raises(RuntimeError) as exc: |
| 794 | clone_repository(url, tmp_path, callbacks=MyCallbacks()) |
| 795 | assert str(exc.value) == 'Unexpected error' |
| 796 | |
| 797 | |
| 798 | def test_clone_with_checkout_branch(barerepo: Repository, tmp_path: Path) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…