MCPcopy
hub / github.com/pallets/werkzeug / test_local_stack_asyncio

Function test_local_stack_asyncio

tests/test_local.py:121–133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

119
120
121def test_local_stack_asyncio():
122 ls = local.LocalStack(_cv_stack)
123 ls.push(1)
124
125 async def task():
126 ls.push(1)
127 assert len(ls._storage.get()) == 2
128
129 async def main():
130 futures = [asyncio.ensure_future(task()) for _ in range(3)]
131 await asyncio.gather(*futures)
132
133 asyncio.run(main())
134
135
136def test_proxy_local():

Callers

nothing calls this directly

Calls 3

pushMethod · 0.95
mainFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected