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

Function test_lifespan_off

tests/test_lifespan.py:43–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41
42
43def test_lifespan_off():
44 async def app(scope, receive, send):
45 pass # pragma: no cover
46
47 async def test():
48 config = Config(app=app, lifespan="off")
49 lifespan = LifespanOff(config)
50
51 await lifespan.startup()
52 await lifespan.shutdown()
53
54 loop = asyncio.new_event_loop()
55 loop.run_until_complete(test())
56 loop.close()
57
58
59def test_lifespan_auto():

Callers

nothing calls this directly

Calls 2

testFunction · 0.85
closeMethod · 0.45

Tested by

no test coverage detected