MCPcopy Index your code
hub / github.com/python/cpython / test_to_thread_once

Method test_to_thread_once

Lib/test/test_asyncio/test_threads.py:26–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

24 await asyncio.to_thread(raise_runtime)
25
26 async def test_to_thread_once(self):
27 func = mock.Mock()
28
29 await asyncio.to_thread(func)
30 func.assert_called_once()
31
32 async def test_to_thread_concurrent(self):
33 calls = []

Callers

nothing calls this directly

Calls 1

assert_called_onceMethod · 0.80

Tested by

no test coverage detected