MCPcopy
hub / github.com/pallets/jinja / test_await_on_calls

Function test_await_on_calls

tests/test_async.py:38–51  ·  view source on GitHub ↗
(run_async_fn)

Source from the content-addressed store, hash-verified

36
37
38def test_await_on_calls(run_async_fn):
39 t = Template("{{ async_func() + normal_func() }}", enable_async=True)
40
41 async def async_func():
42 return 42
43
44 def normal_func():
45 return 23
46
47 async def func():
48 return await t.render_async(async_func=async_func, normal_func=normal_func)
49
50 rv = run_async_fn(func)
51 assert rv == "65"
52
53
54def test_await_on_calls_normal_render():

Callers

nothing calls this directly

Calls 2

TemplateClass · 0.90
run_async_fnFunction · 0.70

Tested by

no test coverage detected