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/loader.pyo

�
,��Qc@s�dZddlZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZmZm
Z
ddlmZmZddlmZmZddlmZddlmZdefd	��YZd
efd��YZd�ZdS(
s�
    jinja2.testsuite.loader
    ~~~~~~~~~~~~~~~~~~~~~~~

    Test the loaders.

    :copyright: (c) 2010 by the Jinja Team.
    :license: BSD, see LICENSE for more details.
i����N(t
JinjaTestCasetdict_loadertpackage_loadertfilesystem_loadertfunction_loadert
choice_loadert
prefix_loader(tEnvironmenttloaders(tPYPYtPY2(tsplit_template_path(tTemplateNotFoundtLoaderTestCasecBsYeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
RS(	cCs8tdt�}|jd�}|jt|jd�dS(Ntloaders
justdict.htmlsmissing.html(RRtget_templatet
assert_raisesR(tselftenvttmpl((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyttest_dict_loaderscCs8tdt�}|jd�}|jt|jd�dS(NRs	test.htmlsmissing.html(RRRRR(RRR((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyttest_package_loader#scCsGtdt�}|jd�}|jd�}|jt|jd�dS(NRs	test.htmls
foo/test.htmlsmissing.html(RRRRR(RRR((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyttest_filesystem_loader)scCsGtdt�}|jd�}|jd�}|jt|jd�dS(NRs
justdict.htmls	test.htmlsmissing.html(RRRRR(RRR((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyttest_choice_loader1scCs8tdt�}|jd�}|jt|jd�dS(NRsjustfunction.htmlsmissing.html(RRRRR(RRR((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyttest_function_loader9scCsGtdt�}|jd�}|jd�}|jt|jd�dS(NRsa/test.htmlsb/justdict.htmltmissing(RRRRR(RRR((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyttest_prefix_loader?scs�t�dtjf�fd��Y}td|�dd�}|jd�}t�t�td|�dd�}td|�dd�}|jd	�}|jd
�}|jd�}dS(Nt
TestLoadercseZ�fd�ZRS(csdd�fd�fS(Nufoocs�S(N(((tchanged(s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyt<lambda>Ks(tNone(Rtenvironmentttemplate(R(s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyt
get_sourceJs(t__name__t
__module__R!((R(s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyRIsRt
cache_sizei����R iitonettwotthree(tFalseRt
BaseLoaderRRtTrue(RRRRtt1tt2tt3((Rs;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyttest_cachingGscCs3idd6}tdtj|��}d|d<dS(NR%tfooRR&(RRt
DictLoader(RtmappingR((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyt"test_dict_loader_cache_invalidatesas

cCs|jttd�dS(Ns../foo(RRR(R((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyttest_split_template_pathhs(R"R#RRRRRRR.R2R3(((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyR
s								tModuleLoaderTestCasecBs�eZdZded�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd�Ze
rsersd	�Znd
�Zd�ZRS(
tdeflatedcCs�tt|�j�g}tdt�|_|dk	rStjdd�d|_	ntj
�|_	|jj|j	d|d|jd|�tdt
j|j	��|_dj|�S(	NRtsuffixs.zipitziptlog_functiont
py_compilet(tsuperR4tsetupRRtreg_envRttempfiletmkstemptarchivetmkdtemptcompile_templatestappendRtModuleLoadertmod_envtjoin(RR7R9tlog((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pytcompile_downqs	cCsjtt|�j�t|d�rftjj|j�rJtj|j�nt	j
|j�d|_ndS(NRE(R;R4tteardownthasattrtostpathtisfileR@tremovetshutiltrmtreeR(R((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyRIscCs|j�}dS(N(RH(RRG((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyttest_log�scCsL|jjd�}|jjd�}|jjd�}|jjd�}dS(Nsa/test.htmlsb/justdict.html(R=RRE(Rttmpl1ttmpl2((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyt_test_common�s
cCs|jdd�|j�dS(NR7R5(RHRT(R((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyttest_deflated_zip_compile�scCs|jdd�|j�dS(NR7tstored(RHRT(R((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyttest_stored_zip_compile�scCs|jdd�|j�dS(NR7(RHRRT(R((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyttest_filesystem_compile�scCsu|j�|jjd�}tjjd�}|jjjj}d|_}yddl
}|j�WnnXdS(Nsa/test.htmli����(RHRERRRDtget_template_keyRtmoduleR"Rtgctcollect(RRtkeytnameR[((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyttest_weak_references�s

cCs:|jdt�}|jjd�}|jjjj}dS(NR9sa/test.html(RHR*RERRRZt-tmpl_3c4ddf650c1a73df961a6d3d2ce2752f1b8fd490(RRGRRtmod((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyttest_byte_compilation�scCs�|j�}tj|jjtjidd6�g�|j_|jjd�}|j|j�d�|jjd�}|j|j�d�dS(Nt
DICT_TEMPLATEtDICT_SOURCEsa/test.htmltBAR(	RHRtChoiceLoaderRERR0Rtassert_equaltrender(RRGRRRS((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyR�s	"cCs�|j�}tji|jjd6tjidd6�d6�|j_|jjd�}|j|j�d�|jjd�}|j|j�d�dS(NtMODRcs	test.htmltDICTsMOD/a/test.htmlResDICT/test.html(	RHRtPrefixLoaderRERR0RRgRh(RRGRRRS((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyR�s	
#N(R"R#RR@R(RHRIRQRTRURWRXR_R
R	RbRR(((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyR4ns									
	
cCs<tj�}|jtjt��|jtjt��|S(N(tunittestt	TestSuitetaddTestt	makeSuiteR
R4(tsuite((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyRp�s(t__doc__RKtsysR>RORltjinja2.testsuiteRRRRRRRtjinja2RRtjinja2._compatR	R
tjinja2.loadersRtjinja2.exceptionsRR
R4Rp(((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyt<module>
s4Sp

Zerion Mini Shell 1.0