Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/site-packages/mako/testing/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/site-packages/mako/testing/__pycache__/fixtures.cpython-38.pyc
U

O��g��@srddlZddlmZddlmZddlmZddlmZddlmZGdd	�d	�Z	Gd
d�de�Z
eded�dS)
�N)�	CacheImpl)�register_plugin)�Template�)�eq_)�configc@sBeZdZdd�Zdd�Zddd�Zdd	d
�Zddd�Zd
d�ZdS)�TemplateTestcKs"|�|�}tf||tjd�|��S)N)�uri�filenameZmodule_directory)�
_file_pathrrZmodule_base)�selfr
�kw�filepath�r�B/opt/cppython/lib/python3.8/site-packages/mako/testing/fixtures.py�_file_templates
��zTemplateTest._file_templatecCsHtj�|�\}}tj�tj|d|�}tj�|�r8|Stj�tj|�S)NZ_py3k)�os�path�splitext�joinrZ
template_base�exists)rr
�name�extZ	py3k_pathrrrrs
zTemplateTest._file_pathNTcKs&|j|f|�}|j|||||d�dS)N��filters�unicode_�
template_args)r�_do_test)rr
�expectedrrrr
�t1rrr�
_do_file_tests	�zTemplateTest._do_file_testcKs*tfd|i|��}|j|||||d�dS)N�textr)rr)r�sourcerrrrr
rrrr�_do_memory_test.s	�zTemplateTest._do_memory_testcCsD|dkri}|r|jf|�}n|jf|�}|r6||�}t||�dS�N)Zrender_unicode�renderr)r�templaterrrr�outputrrrr@szTemplateTest._do_testcs:d|�d�}d|�d�d|�d�f}t�fdd�|D��S)Nz&#39;zlocal variable z referenced before assignmentzcannot access local variable z where it is not associatedc3s|]}|�kVqdSr$r)�.0�msg��rendered_outputrr�	<genexpr>[sz=TemplateTest.indicates_unbound_local_error.<locals>.<genexpr>)�any)rr+Zunbound_var�varZ
error_msgsrr*r�indicates_unbound_local_errorSs


�z*TemplateTest.indicates_unbound_local_error)NTN)NTN)NNT)	�__name__�
__module__�__qualname__rrr r#rr/rrrrr
s	�
�
�
rc@s8eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
�PlainCacheImplzTSimple memory cache impl so that tests which
    use caching can run without beaker.cCs||_i|_dSr$)�cache�data)rr4rrr�__init__bszPlainCacheImpl.__init__cKs0||jkr|j|S|f|�|j|<}|SdSr$�r5)r�keyZcreation_functionr
r5rrr�
get_or_createfs

zPlainCacheImpl.get_or_createcKs||j|<dSr$r7)rr8�valuer
rrr�putmszPlainCacheImpl.putcKs
|j|Sr$r7�rr8r
rrr�getpszPlainCacheImpl.getcKs|j|=dSr$r7r<rrr�
invalidatesszPlainCacheImpl.invalidateN)	r0r1r2�__doc__r6r9r;r=r>rrrrr3^sr3�plain)rZ
mako.cacherrZ
mako.templaterZ
assertionsrrrr3r0rrrr�<module>sT

F1le Man4ger