Spade
Mini Shell
| Directory:~$ /lib/python2.7/site-packages/jinja2/ |
| [Home] [System Details] [Kill Me] |
�
��Rc@s`dZddlZddlmZddlmZmZmZejd�Z e
e �ZeZ
d�Zd�Zd�Zd �Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zied6ed6ed6ed6ed6ed6ed6ed6ed6ed6ed6ed
6ed!6e
d"6ed#6ed$6ZdS(%s�
jinja2.tests
~~~~~~~~~~~~
Jinja test functions. Used with the "is" operator.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
i����N(t Undefined(t text_typetstring_typest
mapping_typess^-?\d+(\.\d+)?$cCs|ddkS(s#Return
true if the variable is
odd.ii((tvalue((s0/usr/lib/python2.7/site-packages/jinja2/tests.pyttest_oddscCs|ddkS(s$Return
true if the variable is
even.ii((R((s0/usr/lib/python2.7/site-packages/jinja2/tests.pyt test_evenscCs||dkS(s-Check
if a variable is divisible by a
number.i((Rtnum((s0/usr/lib/python2.7/site-packages/jinja2/tests.pyttest_divisibleby!scCst|t�S(s;Return
true if the variable is defined:
.. sourcecode:: jinja
{% if variable is defined %}
value of variable: {{ variable }}
{% else %}
variable is not defined
{% endif %}
See the :func:`default` filter for a simple way to set undefined
variables.
(t
isinstanceR(R((s0/usr/lib/python2.7/site-packages/jinja2/tests.pyttest_defined&scCs
t|t�S(s-Like
:func:`defined` but the other way
round.(R R(R((s0/usr/lib/python2.7/site-packages/jinja2/tests.pyttest_undefined7scCs
|dkS(s$Return true if the variable is
none.N(tNone(R((s0/usr/lib/python2.7/site-packages/jinja2/tests.pyt test_none<scCst|�j�S(s*Return
true if the variable is
lowercased.(Rtislower(R((s0/usr/lib/python2.7/site-packages/jinja2/tests.pyt
test_lowerAscCst|�j�S(s*Return true if the variable is
uppercased.(Rtisupper(R((s0/usr/lib/python2.7/site-packages/jinja2/tests.pyt
test_upperFscCs
t|t�S(s&Return true if the object is a
string.(R R(R((s0/usr/lib/python2.7/site-packages/jinja2/tests.pyttest_stringKscCs
t|t�S(sSReturn
true if the object is a mapping (dict etc.).
.. versionadded:: 2.6
(R R(R((s0/usr/lib/python2.7/site-packages/jinja2/tests.pyttest_mappingPscCst|tttf�S(s(Return
true if the variable is a
number.(R tinttfloattcomplex(R((s0/usr/lib/python2.7/site-packages/jinja2/tests.pyttest_numberXscCs$yt|�|jWntSXtS(s^Return
true if the variable is a sequence. Sequences are variables
that are iterable.
(tlent__getitem__tFalsetTrue(R((s0/usr/lib/python2.7/site-packages/jinja2/tests.pyt
test_sequence]s
cCs
||kS(s�Check if an object points to the same memory address than
another
object:
.. sourcecode:: jinja
{% if foo.attribute is sameas false %}
the foo attribute really is the `False` singleton
{% endif %}
((Rtother((s0/usr/lib/python2.7/site-packages/jinja2/tests.pyttest_sameasis
cCs'yt|�Wntk
r"tSXtS(s1Check if it's possible to iterate over an
object.(titert TypeErrorRR(R((s0/usr/lib/python2.7/site-packages/jinja2/tests.pyt
test_iterablevs
cCs
t|d�S(sCheck if the value is
escaped.t__html__(thasattr(R((s0/usr/lib/python2.7/site-packages/jinja2/tests.pyttest_escapedstoddteventdivisiblebytdefinedt undefinedtnonetlowertuppertstringtmappingtnumbertsequencetiterabletcallabletsameastescaped(t__doc__tretjinja2.runtimeRtjinja2._compatRRRtcompilet number_rettypet
regex_typeR2t
test_callableRRRR
RR
RRRRRRRR!R$tTESTS(((s0/usr/lib/python2.7/site-packages/jinja2/tests.pyt<module>
sL