From: Armin Ronacher Date: Sat, 29 May 2010 20:03:29 +0000 (+0200) Subject: Added a testcase for add_extension X-Git-Tag: 2.5~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4c78436661afc2c588db49fef11e962757a0b6b;p=thirdparty%2Fjinja.git Added a testcase for add_extension --HG-- branch : trunk --- diff --git a/jinja2/testsuite/ext.py b/jinja2/testsuite/ext.py index 98e4161a..f97853d1 100644 --- a/jinja2/testsuite/ext.py +++ b/jinja2/testsuite/ext.py @@ -158,6 +158,12 @@ class StreamFilterExtension(Extension): class ExtensionsTestCase(JinjaTestCase): + def test_extend_late(self): + env = Environment() + env.add_extension('jinja2.ext.autoescape') + t = env.from_string('{% autoescape true %}{{ "" }}{% endautoescape %}') + assert t.render() == '<test>' + def test_loop_controls(self): env = Environment(extensions=['jinja2.ext.loopcontrols'])