Viewing File: /usr/lib/python2.7/site-packages/jinja2/testsuite/debug.pyc

ó
,òQc@spdZddlZddlmZmZddlmZmZedeƒZdefd„ƒYZ	d„Z
dS(	s²
    jinja2.testsuite.debug
    ~~~~~~~~~~~~~~~~~~~~~~

    Tests the debug system.

    :copyright: (c) 2010 by the Jinja Team.
    :license: BSD, see LICENSE for more details.
iÿÿÿÿN(t
JinjaTestCasetfilesystem_loader(tEnvironmenttTemplateSyntaxErrortloadert
DebugTestCasecBs#eZd„Zd„Zd„ZRS(cs2‡fd†}tjdƒ‰|j|dƒdS(Ncsˆjdd„ƒdS(NtfailcSsddS(Nii((((s:/usr/lib/python2.7/site-packages/jinja2/testsuite/debug.pyt<lambda>s(trender((ttmpl(s:/usr/lib/python2.7/site-packages/jinja2/testsuite/debug.pyttestssbroken.htmlsó
  File ".*?broken.html", line 2, in (top-level template code|<module>)
    \{\{ fail\(\) \}\}
  File ".*?debug.pyc?", line \d+, in <lambda>
    tmpl\.render\(fail=lambda: 1 / 0\)
ZeroDivisionError: (int(eger)? )?division (or modulo )?by zero
(tenvtget_templatetassert_traceback_matches(tselfR
((R	s:/usr/lib/python2.7/site-packages/jinja2/testsuite/debug.pyttest_runtime_errors	cCs|jd„dƒdS(NcSs
tjdƒS(Nssyntaxerror.html(RR(((s:/usr/lib/python2.7/site-packages/jinja2/testsuite/debug.pyR'ss(?sm)
  File ".*?syntaxerror.html", line 4, in (template|<module>)
    \{% endif %\}.*?
(jinja2\.exceptions\.)?TemplateSyntaxError: Encountered unknown tag 'endif'. Jinja was looking for the following tags: 'endfor' or 'else'. The innermost block that needs to be closed is 'for'.
    (R
(R((s:/usr/lib/python2.7/site-packages/jinja2/testsuite/debug.pyttest_syntax_error"scCsd„}|j|dƒdS(NcSstddƒ‚dS(Ntwtfi*(R(((s:/usr/lib/python2.7/site-packages/jinja2/testsuite/debug.pyR
.ssŽ
  File ".*debug.pyc?", line \d+, in test
    raise TemplateSyntaxError\('wtf', 42\)
(jinja2\.exceptions\.)?TemplateSyntaxError: wtf
  line 42(R
(RR
((s:/usr/lib/python2.7/site-packages/jinja2/testsuite/debug.pyttest_regular_syntax_error-s		(t__name__t
__module__RRR(((s:/usr/lib/python2.7/site-packages/jinja2/testsuite/debug.pyRs		cCs&tjƒ}|jtjtƒƒ|S(N(tunittestt	TestSuitetaddTestt	makeSuiteR(tsuite((s:/usr/lib/python2.7/site-packages/jinja2/testsuite/debug.pyR7s(t__doc__Rtjinja2.testsuiteRRtjinja2RRRRR(((s:/usr/lib/python2.7/site-packages/jinja2/testsuite/debug.pyt<module>
s#
Back to Directory File Manager