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

Method test_should_be_async

IPython/core/tests/test_async_helpers.py:19–32  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

17
18class AsyncTest(TestCase):
19 def test_should_be_async(self):
20 nt.assert_false(_should_be_async("False"))
21 nt.assert_true(_should_be_async("await bar()"))
22 nt.assert_true(_should_be_async("x = await bar()"))
23 nt.assert_false(
24 _should_be_async(
25 dedent(
26 """
27 async def awaitable():
28 pass
29 """
30 )
31 )
32 )
33
34 def _get_top_level_cases(self):
35 # These are test cases that should be valid in a function

Callers

nothing calls this directly

Calls 2

_should_be_asyncFunction · 0.90
dedentFunction · 0.85

Tested by

no test coverage detected