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

Function test_basic_async

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

Source from the content-addressed store, hash-verified

24
25
26def test_basic_async(run_async_fn):
27 t = Template(
28 "{% for item in [1, 2, 3] %}[{{ item }}]{% endfor %}", enable_async=True
29 )
30
31 async def func():
32 return await t.render_async()
33
34 rv = run_async_fn(func)
35 assert rv == "[1][2][3]"
36
37
38def test_await_on_calls(run_async_fn):

Callers

nothing calls this directly

Calls 2

TemplateClass · 0.90
run_async_fnFunction · 0.70

Tested by

no test coverage detected