Mercurial > hg
changeset 36971:ff9cb7067329
test-template-engine: do not evaluate unused keywords by custom engine
If the custom engine, "mytemplater", were installed as the default, it would
enter to an infinite recursion at stringify(v) because template keywords may
generate a nested mapping containing the same keywords.
Spotted by a future patch which will replace context.resource('templ')(...)
with context.process(...).
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 17 Mar 2018 00:06:14 +0900 |
parents | e55d80804ace |
children | 28ba7d111337 |
files | tests/test-template-engine.t |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-template-engine.t Fri Mar 16 23:59:13 2018 +0900 +++ b/tests/test-template-engine.t Sat Mar 17 00:06:14 2018 +0900 @@ -16,8 +16,7 @@ > props = self._defaults.copy() > props.update(map) > for k, v in props.items(): - > if k in (b'templ', b'ctx', b'repo', b'revcache', b'cache', - > b'troubles'): + > if b'{{%s}}' % k not in tmpl: > continue > if callable(v) and getattr(v, '_requires', None) is None: > props = self._resources.copy()