(self, env)
| 91 | ) |
| 92 | |
| 93 | def test_extends_output_bugs(self, env): |
| 94 | env = Environment( |
| 95 | loader=DictLoader({"parent.html": "(({% block title %}{% endblock %}))"}) |
| 96 | ) |
| 97 | |
| 98 | t = env.from_string( |
| 99 | '{% if expr %}{% extends "parent.html" %}{% endif %}' |
| 100 | "[[{% block title %}title{% endblock %}]]" |
| 101 | "{% for item in [1, 2, 3] %}({{ item }}){% endfor %}" |
| 102 | ) |
| 103 | assert t.render(expr=False) == "[[title]](1)(2)(3)" |
| 104 | assert t.render(expr=True) == "((title))" |
| 105 | |
| 106 | def test_urlize_filter_escaping(self, env): |
| 107 | tmpl = env.from_string('{{ "http://www.example.org/<foo"|urlize }}') |
nothing calls this directly
no test coverage detected