From: Armin Ronacher Date: Sun, 11 May 2008 21:43:07 +0000 (+0200) Subject: made the recursive for loop test easier to debug X-Git-Tag: 2.0rc1~70 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b455c31bb09a2da5c95826fb6520bbfa17f18cec;p=jinja2.git made the recursive for loop test easier to debug --HG-- branch : trunk --- diff --git a/tests/test_forloop.py b/tests/test_forloop.py index 9f9020a..4cdb3bb 100644 --- a/tests/test_forloop.py +++ b/tests/test_forloop.py @@ -22,7 +22,7 @@ SCOPE = '''{% for item in seq %}{% endfor %}{{ item }}''' VARLEN = '''{% for item in iter %}{{ item }}{% endfor %}''' NONITER = '''{% for item in none %}...{% endfor %}''' RECURSIVE = '''{% for item in seq recursive -%} - [{{ item.a }}{% if item.b %}[{{ loop(item.b) }}]{% endif %}] + [{{ item.a }}{% if item.b %}<{{ loop(item.b) }}>{% endif %}] {%- endfor %}''' @@ -90,4 +90,4 @@ def test_recursive(env): dict(a=1, b=[dict(a=1), dict(a=2)]), dict(a=2, b=[dict(a=1), dict(a=2)]), dict(a=3, b=[dict(a='a')]) - ]) == '[1[[1][2]]][2[[1][2]]][3[[a]]]' + ]) == '[1<[1][2]>][2<[1][2]>][3<[a]>]'