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

Function test_push_threads

test/test_remote.py:542–555  ·  view source on GitHub ↗
(origin: Repository, clone: Repository, remote: Remote)

Source from the content-addressed store, hash-verified

540
541
542def test_push_threads(origin: Repository, clone: Repository, remote: Remote) -> None:
543 from pygit2 import RemoteCallbacks
544
545 callbacks = RemoteCallbacks()
546 remote.push(['refs/heads/master'], callbacks)
547 assert callbacks.push_options.pb_parallelism == 1
548
549 callbacks = RemoteCallbacks()
550 remote.push(['refs/heads/master'], callbacks, threads=0)
551 assert callbacks.push_options.pb_parallelism == 0
552
553 callbacks = RemoteCallbacks()
554 remote.push(['refs/heads/master'], callbacks, threads=1)
555 assert callbacks.push_options.pb_parallelism == 1
556
557
558def test_push_negotiation(

Callers

nothing calls this directly

Calls 2

RemoteCallbacksClass · 0.90
pushMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…