MCPcopy Create free account
hub / github.com/commandoperator/cmdop-sdk / FakeProc

Class FakeProc

python/tests/test_transport.py:57–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55
56
57def _feed(process: _Process, envelope: pb.Envelope) -> None:
58 data = envelope.SerializeToString()
59 process.stdout.feed_data(_VarintBytes(len(data)) + data)
60
61
62async def _request(process: _Process) -> pb.Envelope:
63 return pb.Envelope.FromString(await _read_delimited(process.requests))
64
65
66@pytest.mark.asyncio
67async def test_unary_round_trip_and_error_mapping() -> None:
68 transport, process = _transport()
69 call = asyncio.create_task(
70 transport.call_unary(pb.Envelope(system_bootstrap_req=pb.SystemBootstrapRequest()))
71 )
72 request = await _request(process)
73 _feed(

Callers 1

_make_transportFunction · 0.70

Calls

no outgoing calls

Tested by 1

_make_transportFunction · 0.56