projects
/
jinja2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66a9344
)
made the recursive for loop test easier to debug
author
Armin Ronacher
<armin.ronacher@active-4.com>
Sun, 11 May 2008 21:43:07 +0000
(23:43 +0200)
committer
Armin Ronacher
<armin.ronacher@active-4.com>
Sun, 11 May 2008 21:43:07 +0000
(23:43 +0200)
--HG--
branch : trunk
tests/test_forloop.py
patch
|
blob
|
history
diff --git
a/tests/test_forloop.py
b/tests/test_forloop.py
index 9f9020acc9c1accba86ef2a83c5f989c1127d3dc..4cdb3bb46671fc66cf9f3ee1236115b914ecc360 100644
(file)
--- 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]>
]'