MCPcopy Create free account
hub / github.com/encode/starlette / app

Function app

tests/test_routing.py:760–767  ·  view source on GitHub ↗
(scope: Scope, receive: Receive, send: Send)

Source from the content-addressed store, hash-verified

758 startup_failed = False
759
760 async def app(scope: Scope, receive: Receive, send: Send) -> None:
761 async def _send(message: Message) -> None:
762 nonlocal startup_failed
763 if message["type"] == "lifespan.startup.failed": # pragma: no branch
764 startup_failed = True
765 return await send(message)
766
767 await router(scope, receive, _send)
768
769 with pytest.raises(RuntimeError):
770 with test_client_factory(app):

Callers 2

_appFunction · 0.70
no_state_wrapperFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected