Mercurial > public > mercurial-scm > hg
diff tests/test-template-engine @ 10054:1a85861f59af
cmdutil: extract ctx dependent closures into templatekw
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 13 Dec 2009 18:06:23 +0100 |
parents | d4d4da54ab05 |
children | e400a511e63a |
line wrap: on
line diff
--- a/tests/test-template-engine Sun Dec 13 18:06:23 2009 +0100 +++ b/tests/test-template-engine Sun Dec 13 18:06:23 2009 +0100 @@ -11,6 +11,10 @@ def process(self, t, map): tmpl = self.loader(t) for k, v in map.iteritems(): + if k in ('templ', 'ctx'): + continue + if hasattr(v, '__call__'): + v = v(**map) v = templater.stringify(v) tmpl = tmpl.replace('{{%s}}' % k, v) yield tmpl