MCPcopy Create free account
hub / github.com/ipython/ipython / test_run_cell_async

Function test_run_cell_async

IPython/core/tests/test_interactiveshell.py:1011–1018  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1009
1010
1011def test_run_cell_async():
1012 loop = asyncio.get_event_loop()
1013 ip.run_cell("import asyncio")
1014 coro = ip.run_cell_async("await asyncio.sleep(0.01)\n5")
1015 assert asyncio.iscoroutine(coro)
1016 result = loop.run_until_complete(coro)
1017 assert isinstance(result, interactiveshell.ExecutionResult)
1018 assert result.result == 5
1019
1020
1021def test_should_run_async():

Callers

nothing calls this directly

Calls 2

run_cell_asyncMethod · 0.80
run_cellMethod · 0.45

Tested by

no test coverage detected