Skip to content
Myr

Merge branch 'master' into sprint-branch

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parents e94dd1f, 2b5b35a · Browse files · 1 file+4 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−3 removed

  • other:+4 added−3 removed

1 file+4 added−3 removed

modified:jinja2/testsuite/regression.py+4 added-3 removed
245 unmodified lines
246 except TemplateNotFound as e:247 assert e.name == 'foo/bar.html'248 else:249 assert False, 'expected error here'250 250251 def test_contextfunction_callable_classes(self):252 from jinja2.utils import contextfunction253 class CallableClass(object):254 @contextfunction255 def __call__(self, ctx):256 return ctx.resolve('hello')257 257258 tpl = Template("""{{ callableclass() }}""")259 output = tpl.render(callableclass = CallableClass(), hello = 'TEST')260 expected = 'TEST'261 261262 self.assert_equal(output, expected)263264265def suite():266 suite = unittest.TestSuite()267 suite.addTest(unittest.makeSuite(CornerTestCase))268 suite.addTest(unittest.makeSuite(BugTestCase))
1 unmodified line