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

Function test_async_iteration_in_templates_extended

tests/test_async.py:114–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112
113
114def test_async_iteration_in_templates_extended():
115 t = Template(
116 "{% for x in rng %}{{ loop.index0 }}/{{ x }}{% endfor %}", enable_async=True
117 )
118 stream = t.generate(rng=auto_aiter(range(1, 4)))
119 assert next(stream) == "0"
120 assert "".join(stream) == "/11/22/3"
121
122
123@pytest.fixture

Callers

nothing calls this directly

Calls 3

generateMethod · 0.95
TemplateClass · 0.90
auto_aiterFunction · 0.90

Tested by

no test coverage detected