Spade
Mini Shell
| Directory:~$ /lib/python2.7/site-packages/jinja2/testsuite/ |
| [Home] [System Details] [Kill Me] |
�
0Rc@s[dZddlZddlZddlZddlZddlmZddlmZddl m
Z
ejjejj
e��Zejidd6�Zejdd �Zejed
�Zejidd6j�Zejeeg�Zejied6ed
6�Zdejfd��YZd�Zdej
fd��YZ!d�Z"d�Z#dS(s
jinja2.testsuite
~~~~~~~~~~~~~~~~
All the unittests of Jinja2. These tests can be executed by
either running run-tests.py using multiple Python versions at
the same time.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
i����N(tformat_exception(tloaders(tPY2tFOOs
justdict.htmlsjinja2.testsuite.rest templatess/res/templatessjustfunction.htmltatbt
JinjaTestCasecBsGeZd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cCsdS(N((tself((s=/usr/lib/python2.7/site-packages/jinja2/testsuite/__init__.pytsetup*scCsdS(N((R((s=/usr/lib/python2.7/site-packages/jinja2/testsuite/__init__.pytteardown-scCs|j�dS(N(R (R((s=/usr/lib/python2.7/site-packages/jinja2/testsuite/__init__.pytsetUp0scCs|j�dS(N(R
(R((s=/usr/lib/python2.7/site-packages/jinja2/testsuite/__init__.pyttearDown3scCs|j||�S(N(tassertEqual(RRR((s=/usr/lib/python2.7/site-packages/jinja2/testsuite/__init__.pytassert_equal6scOs|j||�S(N(tassertRaises(Rtargstkwargs((s=/usr/lib/python2.7/site-packages/jinja2/testsuite/__init__.pyt
assert_raises9scCs�y|�Wnqtk
r~}ttj��}tj|j�dj|��dkr�|j ddj|�|f��q�nX|j d�dS(Nts)Traceback
did not match:
%s
expected:
%ssExpected exception(
t ExceptionRtsystexc_infotretsearchtstriptjointNonetfail(Rtcallbacktexpected_tbtettb((s=/usr/lib/python2.7/site-packages/jinja2/testsuite/__init__.pytassert_traceback_matches<s'
( t__name__t
__module__R R
RRRRR!(((s=/usr/lib/python2.7/site-packages/jinja2/testsuite/__init__.pyR%s ccsr|g}xb|rm|j�}y|j|�Wqtk
ri|d|jj|jj|jffVqXqWdS(s8Yields all the tests and their
names from a given
suite.s%s.%s.%sN(tpoptextendt TypeErrort __class__R#R"t_testMethodName(tsuitetsuitests((s=/usr/lib/python2.7/site-packages/jinja2/testsuite/__init__.pytfind_all_testsHs
tBetterLoadercBs#eZdZd�Zdd�ZRS(s~A
nicer loader that solves two problems. First of all we are setting
up tests from different sources and we're doing this
programmatically
which breaks the default loading logic so this is required anyways.
Secondly this loader has a nicer interpolation for test names than the
default one so you can just do ``run-tests.py ViewTestCase`` and it
will work.
cCst�S(N(R)(R((s=/usr/lib/python2.7/site-packages/jinja2/testsuite/__init__.pytgetRootSuite`sc Cs�|j�}|dkr|Sg}xpt|�D]b\}}||ks�|jd|�s�d|d|ks�|j|d�r/|j|�q/q/W|s�td|��nt|�dkr�|dStj�}x|D]}|j |�q�W|S(NR)t.s!could
not find test case for "%s"ii(
R.R,tendswitht
startswithtappendtLookupErrortlentunittestt TestSuitetaddTest( Rtnametmoduletroott all_teststtestcasettestnametrvttest((s=/usr/lib/python2.7/site-packages/jinja2/testsuite/__init__.pytloadTestsFromNamecs$
N(R"R#t__doc__R.RR@(((s=/usr/lib/python2.7/site-packages/jinja2/testsuite/__init__.pyR-Ws cCs�ddlm}m}m}m}m}m}m}m}m }m
} m}
m}m
}m}
m}tj�}|j|j��|j|j��|j|j��|j|j��|j|j��|j|j��|j|j��|j|j��|j|j��|j| j��|j|
j��|j|j��|j|j��|j|
j��tr�|j|j��n|S(Ni����(texttfiltersttestst core_tagstloadertinheritancetimportst lexnparsetsecuritytapit
regressiontdebugtutilstbytecode_cachetdoctests(tjinja2.testsuiteRBRCRDRERFRGRHRIRJRKRLRMRNRORPR5R6R7R)R(RBRCRDRERFRGRHRIRJRKRLRMRNRORPR)((s=/usr/lib/python2.7/site-packages/jinja2/testsuite/__init__.pyR){s&dcCs@ytjdt�dd�Wntk
r;}d|GHnXdS(s/Runs the testsuite as command line application.t
testLoadertdefaultTestR)s Error:
%sN(R5tmainR-R(R((s=/usr/lib/python2.7/site-packages/jinja2/testsuite/__init__.pyRT�s($RAtosRRR5t tracebackRtjinja2Rtjinja2._compatRtpathtdirnametabspatht__file__theret
DictLoadertdict_loadert
PackageLoadertpackage_loadertFileSystemLoadertfilesystem_loadertFunctionLoadertgettfunction_loadertChoiceLoadert
choice_loadertPrefixLoadert
prefix_loadertTestCaseRR,t
TestLoaderR-R)RT(((s=/usr/lib/python2.7/site-packages/jinja2/testsuite/__init__.pyt<module>s,
# $