Skip to content
Myr

Improved async test

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 9853794 · Browse files · 1 file+7 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−4 removed

  • tests:+7 added−4 removed

1 file+7 added−4 removed

modified:tests/test_async.py+7 added-4 removed
42 unmodified lines
434445@pytest.mark.skipif(not have_async_gen, reason='No async generators')46def test_await_and_macros():47 t = Template('{% macro foo(x) %}[{{ x }}]{% endmacro %}{{ foo(42) }}',48 enable_async=True)47 t = Template('{% macro foo(x) %}[{{ x }}][{{ async_func() }}]'48 '{% endmacro %}{{ foo(42) }}', enable_async=True)4950 async def async_func():51 return 425253 async def func():51 return await t.render_async()54 return await t.render_async(async_func=async_func)5556 rv = run(func)54 assert rv == '[42]'57 assert rv == '[42][42]'