MCPcopy
hub / github.com/encode/uvicorn / interrupt_running

Function interrupt_running

tests/test_server.py:76–79  ·  view source on GitHub ↗
(srv: Server)

Source from the content-addressed store, hash-verified

74 """Test interrupting a Server that is run explicitly inside asyncio"""
75
76 async def interrupt_running(srv: Server):
77 while not srv.started:
78 await asyncio.sleep(0.01)
79 signal.raise_signal(exception_signal)
80
81 server = Server(Config(app=dummy_app, loop="asyncio", port=unused_tcp_port))
82 asyncio.create_task(interrupt_running(server))

Callers 1

test_server_interruptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected