%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python37/lib/python3.7/site-packages/jinja2/testsuite/__pycache__/
Upload File :
Create Path :
Current File : //opt/alt/python37/lib/python3.7/site-packages/jinja2/testsuite/__pycache__/debug.cpython-37.pyc

B

,��Q��@sRdZddlZddlmZmZddlmZmZeed�ZGdd�de�Z	dd	�Z
dS)
z�
    jinja2.testsuite.debug
    ~~~~~~~~~~~~~~~~~~~~~~

    Tests the debug system.

    :copyright: (c) 2010 by the Jinja Team.
    :license: BSD, see LICENSE for more details.
�N)�
JinjaTestCase�filesystem_loader)�Environment�TemplateSyntaxError)�loaderc@s$eZdZdd�Zdd�Zdd�ZdS)�
DebugTestCasecs&�fdd�}t�d��|�|d�dS)Ncs�jdd�d�dS)NcSsddS)N�r�r	r	r	�G/opt/alt/python37/lib/python3.7/site-packages/jinja2/testsuite/debug.py�<lambda>�z@DebugTestCase.test_runtime_error.<locals>.test.<locals>.<lambda>)Zfail)Zrenderr	)�tmplr	r
�testsz.DebugTestCase.test_runtime_error.<locals>.testzbroken.htmlz�
  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
)�env�get_template�assert_traceback_matches)�selfrr	)r
r
�test_runtime_errors
z DebugTestCase.test_runtime_errorcCs|�dd�d�dS)NcSs
t�d�S)Nzsyntaxerror.html)rrr	r	r	r
r'rz1DebugTestCase.test_syntax_error.<locals>.<lambda>a(?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)rr	r	r
�test_syntax_error"s
zDebugTestCase.test_syntax_errorcCsdd�}|�|d�dS)NcSstdd��dS)NZwtf�*)rr	r	r	r
r.sz5DebugTestCase.test_regular_syntax_error.<locals>.testz�
  File ".*debug.pyc?", line \d+, in test
    raise TemplateSyntaxError\('wtf', 42\)
(jinja2\.exceptions\.)?TemplateSyntaxError: wtf
  line 42)r)rrr	r	r
�test_regular_syntax_error-sz'DebugTestCase.test_regular_syntax_errorN)�__name__�
__module__�__qualname__rrrr	r	r	r
rsrcCst��}|�t�t��|S)N)�unittestZ	TestSuiteZaddTestZ	makeSuiter)�suiter	r	r
r7sr)�__doc__rZjinja2.testsuiterrZjinja2rrrrrr	r	r	r
�<module>
s
#

Zerion Mini Shell 1.0