A StreamWriter-like sink: bytes land on an asyncio.StreamReader the test 'core' reads, so the core sees exactly what the transport wrote.
| 38 | self.stderr.feed_eof() |
| 39 | self.requests = asyncio.StreamReader() |
| 40 | self.stdin = _Writer(self.requests) |
| 41 | |
| 42 | async def wait(self) -> int: |
| 43 | return 0 |
| 44 | |
| 45 | def kill(self) -> None: |
| 46 | pass |
| 47 | |
| 48 | |
| 49 | def _transport() -> tuple[Transport, _Process]: |
| 50 | transport = Transport(ClientConfig(token="t", base_url="https://relay", timeout_ms=1000), "/none") |
| 51 | process = _Process() |
| 52 | transport._process = process # type: ignore[assignment] |
| 53 | transport._reader_task = asyncio.create_task(transport._read_loop()) |
| 54 | return transport, process |
| 55 | |
| 56 | |
| 57 | def _feed(process: _Process, envelope: pb.Envelope) -> None: |