ó ,òQc@sûdZddlZddlZddlZddlZddlZddlmZmZm Z m Z m Z m 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 JinjaTestCaset dict_loadertpackage_loadertfilesystem_loadertfunction_loadert choice_loadert prefix_loader(t Environmenttloaders(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(NRs a/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.pytKs(tNone(Rt environmentttemplate(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|dRORltjinja2.testsuiteRRRRRRRtjinja2RRtjinja2._compatR R tjinja2.loadersR tjinja2.exceptionsR R R4Rp(((s;/usr/lib/python2.7/site-packages/jinja2/testsuite/loader.pyt s     4Sp