Viewing File: /usr/lib/python2.7/site-packages/jinja2/testsuite/imports.pyc
ó
~KRc
@ s¾ d Z d d l Z d d l m Z d d l m Z m Z d d l m Z m Z e d e e
d d d d
d d ƒ ƒ ƒ Z d
e j d <d e f d „ ƒ YZ
d e f d „ ƒ YZ d „ Z d S( sÉ
jinja2.testsuite.imports
~~~~~~~~~~~~~~~~~~~~~~~~
Tests the import features (with includes).
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
iÿÿÿÿN( t
JinjaTestCase( t Environmentt
DictLoader( t TemplateNotFoundt TemplatesNotFoundt loadert modules5 {% macro test() %}[{{ foo }}|{{ bar }}]{% endmacro %}t headers [{{ foo }}|{{ 23 }}]t o_printers ({{ o }})i t bart ImportsTestCasec B s# e Z d „ Z d „ Z d „ Z RS( c C s t j d ƒ } | j d d ƒ d k s- t ‚ t j d ƒ } | j d d ƒ d k sZ t ‚ t j d ƒ } | j d d ƒ d k s‡ t ‚ t j d ƒ } | j d d ƒ d k s´ t ‚ t j d ƒ } | j d d ƒ d k sá t ‚ t j d
ƒ } | j d d ƒ d k st ‚ d S( Ns( {% import "module" as m %}{{ m.test() }}t fooi* s [|23]s8 {% import "module" as m without context %}{{ m.test() }}s5 {% import "module" as m with context %}{{ m.test() }}s [42|23]s+ {% from "module" import test %}{{ test() }}s; {% from "module" import test without context %}{{ test() }}s8 {% from "module" import test with context %}{{ test() }}( t test_envt from_stringt rendert AssertionError( t selft t( ( s<