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

Method test_macro_escaping

tests/test_regression.py:365–369  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

363 assert t.render().strip() == "45|6"
364
365 def test_macro_escaping(self):
366 env = Environment(autoescape=lambda x: False)
367 template = "{% macro m() %}<html>{% endmacro %}"
368 template += "{% autoescape true %}{{ m() }}{% endautoescape %}"
369 assert env.from_string(template).render()
370
371 def test_macro_scoping(self, env):
372 tmpl = env.from_string(

Callers

nothing calls this directly

Calls 3

from_stringMethod · 0.95
EnvironmentClass · 0.90
renderMethod · 0.45

Tested by

no test coverage detected