(scope: Scope, receive: Receive, send: Send)
| 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): |
no outgoing calls
no test coverage detected