(self, env)
| 341 | t2.render(seq=list(range(3))) |
| 342 | |
| 343 | def test_duplicate_required_or_scoped(self, env): |
| 344 | env = Environment( |
| 345 | loader=DictLoader( |
| 346 | { |
| 347 | class="st">"default1": class="st">"{% for item in seq %}[{% block item " |
| 348 | class="st">"scoped scoped %}}{{% endblock %}}]{{% endfor %}}", |
| 349 | class="st">"default2": class="st">"{% for item in seq %}[{% block item " |
| 350 | class="st">"required required %}}{{% endblock %}}]{{% endfor %}}", |
| 351 | class="st">"child": class="st">"{% if default %}{% extends default %}{% else %}" |
| 352 | class="st">"{% extends &class="cm">#x27;default1' %}{% endif %}{%- block x %}" |
| 353 | class="st">"CHILD{% endblock %}", |
| 354 | } |
| 355 | ) |
| 356 | ) |
| 357 | tmpl = env.get_template(class="st">"child") |
| 358 | |
| 359 | with pytest.raises(TemplateSyntaxError): |
| 360 | tmpl.render(default=class="st">"default1", seq=list(range(3))) |
| 361 | |
| 362 | with pytest.raises(TemplateSyntaxError): |
| 363 | tmpl.render(default=class="st">"default2", seq=list(range(3))) |
| 364 | |
| 365 | |
| 366 | class TestBugFix: |
nothing calls this directly
no test coverage detected