Module Expr Str Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias alias ImportFrom alias Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Call NameLoad keyword Call NameLoad Dict Str Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assert CompareEq Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assert CompareEq Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assert CompareEq Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assert CompareEq Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assert CompareEq Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Call NameLoad Dict Str Str Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Assert CompareEq Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assert CompareEq Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Call NameLoad Dict Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Assert CompareEq Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Call NameLoad Dict Str Str Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr Str For NameStore Call NameLoad Num Num body Assert CompareEq Call AttributeLoad NameLoad attr keyword BinOpMod Str NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Call NameLoad Dict Str Str Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Assert CompareEq Call AttributeLoad NameLoad attr keyword Str Str Assert CompareEq Call AttributeLoad NameLoad attr keyword Str Str Assert CompareEq Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Call NameLoad Dict Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Assert CompareEq Call AttributeLoad NameLoad attr keyword Call NameLoad Num Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Call NameLoad Dict Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Assert CompareEq Call AttributeLoad NameLoad attr keyword Call NameLoad Num Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assert CompareEq Call AttributeLoad Call AttributeLoad Call AttributeLoad Call NameLoad keyword Call NameLoad Dict Str Str Str Str Str Str attr Str attr attr ListLoad Str Str decorator_list decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list
N/A N/A 
    jinja2.testsuite.inheritance
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Tests the template inheritance feature.

    :copyright: (c) 2010 by the Jinja Team.
    :license: BSD, see LICENSE for more details.
 N/A os N/A time N/A tempfile N/A unittest jinja2.testsuite JinjaTestCase jinja2 Environment DictLoader jinja2.exceptions TemplateSyntaxError N/A LAYOUTTEMPLATE |{% block block1 %}block 1 from layout{% endblock %}
|{% block block2 %}block 2 from layout{% endblock %}
|{% block block3 %}
{% block block4 %}nested block 4 from layout{% endblock %}
{% endblock %}| N/A LEVEL1TEMPLATE {% extends "layout" %}
{% block block1 %}block 1 from level1{% endblock %} N/A LEVEL2TEMPLATE {% extends "level1" %}
{% block block2 %}{% block block5 %}nested block 5 from level2{%
endblock %}{% endblock %} N/A LEVEL3TEMPLATE {% extends "level2" %}
{% block block5 %}block 5 from level3{% endblock %}
{% block block4 %}block 4 from level3{% endblock %}
 N/A LEVEL4TEMPLATE {% extends "level3" %}
{% block block3 %}block 3 from level4{% endblock %}
 N/A WORKINGTEMPLATE {% extends "layout" %}
{% block block1 %}
  {% if false %}
    {% block block2 %}
      this should workd
    {% endblock %}
  {% endif %}
{% endblock %}
 N/A env N/A Environment loader N/A DictLoader N/A layout level1 level2 level3 level4 working LAYOUTTEMPLATE LEVEL1TEMPLATE LEVEL2TEMPLATE LEVEL3TEMPLATE LEVEL4TEMPLATE WORKINGTEMPLATE trim_blocks True InheritanceTestCase N/A JinjaTestCase N/A test_layout N/A N/A self N/A N/A N/A tmpl N/A N/A env get_template layout N/A N/A N/A N/A tmpl render |block 1 from layout|block 2 from layout|nested block 4 from layout| N/A test_level1 N/A N/A self N/A N/A N/A tmpl N/A N/A env get_template level1 N/A N/A N/A N/A tmpl render |block 1 from level1|block 2 from layout|nested block 4 from layout| N/A test_level2 N/A N/A self N/A N/A N/A tmpl N/A N/A env get_template level2 N/A N/A N/A N/A tmpl render |block 1 from level1|nested block 5 from level2|nested block 4 from layout| N/A test_level3 N/A N/A self N/A N/A N/A tmpl N/A N/A env get_template level3 N/A N/A N/A N/A tmpl render |block 1 from level1|block 5 from level3|block 4 from level3| N/A test_level4 N/A N/A sel N/A N/A N/A tmpl N/A N/A env get_template level4 N/A N/A N/A N/A tmpl render |block 1 from level1|block 5 from level3|block 3 from level4| N/A test_super N/A N/A self N/A N/A N/A env N/A Environment loader N/A DictLoader N/A a b c {% block intro %}INTRO{% endblock %}|BEFORE|{% block data %}INNER{% endblock %}|AFTER {% extends "a" %}{% block data %}({{ super() }}){% endblock %} {% extends "b" %}{% block intro %}--{{ super() }}--{% endblock %}
{% block data %}[{{ super() }}]{% endblock %} N/A tmpl N/A N/A env get_template c N/A N/A N/A N/A tmpl render --INTRO--|BEFORE|[(INNER)]|AFTER N/A test_working N/A N/A self N/A N/A N/A tmpl N/A N/A env get_template working N/A test_reuse_blocks N/A N/A self N/A N/A N/A tmpl N/A N/A env from_string {{ self.foo() }}|{% block foo %}42{% endblock %}|{{ self.foo() }} N/A N/A N/A N/A tmpl render 42|42|42 N/A test_preserve_blocks N/A N/A self N/A N/A N/A env N/A Environment loader N/A DictLoader N/A a b {% if false %}{% block x %}A{% endblock %}{% endif %}{{ self.x() }} {% extends "a" %}{% block x %}B{{ super() }}{% endblock %} N/A tmpl N/A N/A env get_template b N/A N/A N/A N/A tmpl render BA N/A test_dynamic_inheritance N/A N/A self N/A N/A N/A env N/A Environment loader N/A DictLoader N/A master1 master2 child MASTER1{% block x %}{% endblock %} MASTER2{% block x %}{% endblock %} {% extends master %}{% block x %}CHILD{% endblock %} N/A tmpl N/A N/A env get_template child N/A m N/A range 1 3 N/A N/A N/A N/A N/A tmpl render master N/A master%d m N/A MASTER%dCHILD m N/A test_multi_inheritance N/A N/A self N/A N/A N/A env N/A Environment loader N/A DictLoader N/A master1 master2 child MASTER1{% block x %}{% endblock %} MASTER2{% block x %}{% endblock %} {% if master %}{% extends master %}{% else %}{% extends
                        'master1' %}{% endif %}{% block x %}CHILD{% endblock %} N/A tmpl N/A N/A env get_template child N/A N/A N/A N/A tmpl render master master2 MASTER2CHILD N/A N/A N/A N/A tmpl render master master1 MASTER1CHILD N/A N/A N/A N/A tmpl render MASTER1CHILD N/A test_scoped_block N/A N/A self N/A N/A N/A env N/A Environment loader N/A DictLoader N/A master.html {% for item in seq %}[{% block item scoped %}{% endblock %}]{% endfor %} N/A t N/A N/A env from_string {% extends "master.html" %}{% block item %}{{ item }}{% endblock %} N/A N/A N/A N/A t render seq N/A range 5 [0][1][2][3][4] N/A test_super_in_scoped_block N/A N/A self N/A N/A N/A env N/A Environment loader N/A DictLoader N/A master.html {% for item in seq %}[{% block item scoped %}{{ item }}{% endblock %}]{% endfor %} N/A t N/A N/A env from_string {% extends "master.html" %}{% block item %}{{ super() }}|{{ item * 2 }}{% endblock %} N/A N/A N/A N/A t render seq N/A range 5 [0|0][1|2][2|4][3|6][4|8] N/A N/A BugFixTestCase N/A JinjaTestCase N/A test_fixed_macro_scoping_bug N/A N/A self N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A Environment loader N/A DictLoader N/A test.html details.html standard.html         {% extends 'details.html' %}

        {% macro my_macro() %}
        my_macro
        {% endmacro %}

        {% block inner_box %}
            {{ my_macro() }}
        {% endblock %}
                     {% extends 'standard.html' %}

        {% macro my_macro() %}
        my_macro
        {% endmacro %}

        {% block content %}
            {% block outer_box %}
                outer_box
                {% block inner_box %}
                    inner_box
                {% endblock %}
            {% endblock %}
        {% endblock %}
         
        {% block content %}&nbsp;{% endblock %}
         get_template test.html render split N/A outer_box my_macro N/A N/A suite N/A N/A N/A N/A N/A suite N/A N/A unittest TestSuite N/A N/A N/A suite addTest N/A N/A unittest makeSuite InheritanceTestCase N/A N/A N/A suite addTest N/A N/A unittest makeSuite BugFixTestCase N/A suite N/A