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

Class MyCallbacks

test/test_repository.py:783–790  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

781@utils.requires_network
782def 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:

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…