%PDF- %PDF-
Direktori : /opt/alt/python27/lib/python2.7/site-packages/jinja2/testsuite/ |
Current File : //opt/alt/python27/lib/python2.7/site-packages/jinja2/testsuite/imports.pyo |
� ~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 � } t j d � } t j d � } t j d � } t j d � } t j d � } d S( Ns( {% import "module" as m %}{{ m.test() }}s8 {% import "module" as m without context %}{{ m.test() }}s5 {% import "module" as m with context %}{{ m.test() }}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_string( t selft t( ( sI /opt/alt/python27/lib/python2.7/site-packages/jinja2/testsuite/imports.pyt test_context_imports s c C sE t j d � t j d � t j d � t j d � t j d � d S( Ns- {% from "foo" import bar, baz with context %}s. {% from "foo" import bar, baz, with context %}s) {% from "foo" import bar, with context %}s* {% from "foo" import bar, with, context %}s. {% from "foo" import bar, with with context %}( R R ( R ( ( sI /opt/alt/python27/lib/python2.7/site-packages/jinja2/testsuite/imports.pyt test_trailing_comma+ s c C s t j d � j } d S( Ns {% macro toplevel() %}...{% endmacro %} {% macro __private() %}...{% endmacro %} {% set variable = 42 %} {% for item in [1] %} {% macro notthere() %}{% endmacro %} {% endfor %} ( R R R ( R t m( ( sI /opt/alt/python27/lib/python2.7/site-packages/jinja2/testsuite/imports.pyt test_exports2 s ( t __name__t __module__R R R ( ( ( sI /opt/alt/python27/lib/python2.7/site-packages/jinja2/testsuite/imports.pyR s t IncludesTestCasec B s5 e Z d � Z d � Z d � Z d � Z d � Z RS( c C s1 t j d � } t j d � } t j d � } d S( Ns {% include "header" %}s# {% include "header" with context %}s&