ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/lib/python2.7/site-packages/jinja2/testsuite/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyo

�
,��Qc@s�dZddlZddlmZddlmZmZmZdZdZ	dZ
dZd	Zd
Z
dZedeied
6e	d6e
d6ed6ed6e
d6ed6�de�Zdefd��YZdefd��YZd�ZdS(s�
    jinja2.testsuite.inheritance
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Tests the template inheritance feature.

    :copyright: (c) 2010 by the Jinja Team.
    :license: BSD, see LICENSE for more details.
i����N(t
JinjaTestCase(tEnvironmentt
DictLoadert
TemplateErrors�|{% 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 %}|sJ{% extends "layout" %}
{% block block1 %}block 1 from level1{% endblock %}sq{% extends "level1" %}
{% block block2 %}{% block block5 %}nested block 5 from level2{%
endblock %}{% endblock %}s{% extends "level2" %}
{% block block5 %}block 5 from level3{% endblock %}
{% block block4 %}block 4 from level3{% endblock %}
sK{% extends "level3" %}
{% block block3 %}block 3 from level4{% endblock %}
s�{% extends "layout" %}
{% block block1 %}
  {% if false %}
    {% block block2 %}
      this should workd
    {% endblock %}
  {% endif %}
{% endblock %}
s�{% extends "layout" %}
{% extends "layout" %}
{% block block1 %}
  {% if false %}
    {% block block2 %}
      this should workd
    {% endblock %}
  {% endif %}
{% endblock %}
tloadertlayouttlevel1tlevel2tlevel3tlevel4tworkingtdoubleettrim_blockstInheritanceTestCasecBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�ZRS(cCstjd�}dS(NR(tenvtget_template(tselfttmpl((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyttest_layoutRscCstjd�}dS(NR(RR(RR((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyttest_level1WscCstjd�}dS(NR(RR(RR((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyttest_level2\scCstjd�}dS(NR(RR(RR((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyttest_level3ascCstjd�}dS(NR	(RR(tselR((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyttest_level4fscCs=tdtidd6dd6dd6��}|jd�}dS(NRsU{% block intro %}INTRO{% endblock %}|BEFORE|{% block data %}INNER{% endblock %}|AFTERtas>{% extends "a" %}{% block data %}({{ super() }}){% endblock %}tbso{% extends "b" %}{% block intro %}--{{ super() }}--{% endblock %}
{% block data %}[{{ super() }}]{% endblock %}tc(RRR(RRR((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyt
test_superkscCstjd�}dS(NR
(RR(RR((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyttest_workingxscCstjd�}dS(NsA{{ self.foo() }}|{% block foo %}42{% endblock %}|{{ self.foo() }}(Rtfrom_string(RR((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyttest_reuse_blocks{scCs6tdtidd6dd6��}|jd�}dS(NRsC{% if false %}{% block x %}A{% endblock %}{% endif %}{{ self.x() }}Rs:{% extends "a" %}{% block x %}B{{ super() }}{% endblock %}R(RRR(RRR((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyttest_preserve_blocks�s
cCsWtdtidd6dd6dd6��}|jd�}xtdd	�D]}qIWdS(
NRs"MASTER1{% block x %}{% endblock %}tmaster1s"MASTER2{% block x %}{% endblock %}tmaster2s4{% extends master %}{% block x %}CHILD{% endblock %}tchildii(RRRtrange(RRRtm((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyttest_dynamic_inheritance�scCs=tdtidd6dd6dd6��}|jd�}dS(NRs"MASTER1{% block x %}{% endblock %}R s"MASTER2{% block x %}{% endblock %}R!s�{% if master %}{% extends master %}{% else %}{% extends
                        'master1' %}{% endif %}{% block x %}CHILD{% endblock %}R"(RRR(RRR((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyttest_multi_inheritance�scCs/tdtidd6��}|jd�}dS(NRsH{% for item in seq %}[{% block item scoped %}{% endblock %}]{% endfor %}smaster.htmlsC{% extends "master.html" %}{% block item %}{{ item }}{% endblock %}(RRR(RRtt((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyttest_scoped_block�scCs/tdtidd6��}|jd�}dS(NRsR{% for item in seq %}[{% block item scoped %}{{ item }}{% endblock %}]{% endfor %}smaster.htmlsU{% extends "master.html" %}{% block item %}{{ super() }}|{{ item * 2 }}{% endblock %}(RRR(RRR'((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyttest_super_in_scoped_block�scCsOtdtidd6dd6dd6��}|jd�jdd	�j�}dS(
NRs;
            {% block useless %}{% endblock %}
            slayout.htmlsl
            {%- extends 'layout.html' %}
            {% from 'helpers.html' import foo with context %}
            {% block useless %}
                {% for x in [1, 2, 3] %}
                    {% block testing scoped %}
                        {{ foo(x) }}
                    {% endblock %}
                {% endfor %}
            {% endblock %}
            s
index.htmlsK
            {% macro foo(x) %}{{ the_foo + x }}{% endmacro %}
            shelpers.htmltthe_fooi*(RRRtrendertsplit(RRtrv((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyt#test_scoped_block_after_inheritance�s!(t__name__t
__module__RRRRRRRRRR%R&R(R)R.(((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyR
Ps						
				
					tBugFixTestCasecBseZd�Zd�ZRS(cCsdS(N((R((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyttest_fixed_macro_scoping_bug�scCs-ytjd�}Wntk
r(}nXdS(smEnsures that a template with more than 1 {% extends ... %} usage
        raises a ``TemplateError``.
        RN(RRt	Exception(RRte((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyttest_double_extends�s(R/R0R2R5(((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyR1�s	"cCs<tj�}|jtjt��|jtjt��|S(N(tunittestt	TestSuitetaddTestt	makeSuiteR
R1(tsuite((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyR:�s(t__doc__R6tjinja2.testsuiteRtjinja2RRRtLAYOUTTEMPLATEtLEVEL1TEMPLATEtLEVEL2TEMPLATEtLEVEL3TEMPLATEtLEVEL4TEMPLATEtWORKINGTEMPLATEt
DOUBLEEXTENDStTrueRR
R1R:(((s@/usr/lib/python2.7/site-packages/jinja2/testsuite/inheritance.pyt<module>
s,
	x.

Zerion Mini Shell 1.0