MCPcopy
hub / github.com/encode/starlette / wait_startup

Method wait_startup

starlette/testclient.py:717–732  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

715 await self.stream_send.send(None)
716
717 async def wait_startup(self) -> None:
718 await self.stream_receive.send({"type": "lifespan.startup"})
719
720 async def receive() -> Any:
721 message = await self.stream_send.receive()
722 if message is None:
723 self.task.result()
724 return message
725
726 message = await receive()
727 assert message["type"] in (
728 "lifespan.startup.complete",
729 "lifespan.startup.failed",
730 )
731 if message["type"] == "lifespan.startup.failed":
732 await receive()
733
734 async def wait_shutdown(self) -> None:
735 async def receive() -> Any:

Callers

nothing calls this directly

Calls 2

receiveFunction · 0.50
sendMethod · 0.45

Tested by

no test coverage detected