MCPcopy
hub / github.com/scrapy/scrapy / test_wrapped_coroutine

Method test_wrapped_coroutine

tests/test_utils_defer.py:335–343  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

333
334 @coroutine_test
335 async def test_wrapped_coroutine(self):
336 async def c_f() -> int:
337 return 42
338
339 d = deferred_from_coro(c_f())
340 result = deferred_to_future(d)
341 assert isinstance(result, Future)
342 future_result = await result
343 assert future_result == 42
344
345 @coroutine_test
346 async def test_wrapped_coroutine_asyncio(self):

Callers

nothing calls this directly

Calls 2

deferred_from_coroFunction · 0.90
deferred_to_futureFunction · 0.90

Tested by

no test coverage detected