Skip to content

Commit

Permalink
Add test_with_trailing_comma
Browse files Browse the repository at this point in the history
- to test support for trailing commas in with statements
  • Loading branch information
Zocker1999NET committed Aug 28, 2022
1 parent 6936aeb commit 7d1c34e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_core_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,3 +617,12 @@ def test_with_argument_scoping(self, env):
"""
)
assert tmpl.render(b=3, e=4) == "1|2|3|4|5"

def test_with_trailing_comma(self, env):
tmpl = env.from_string(
"""\
{% with a=42, b=23, -%}
{{ a }} = {{ b }}
{% endwith -%}"""
)
assert tmpl.render().strip() == "42 = 23"

0 comments on commit 7d1c34e

Please sign in to comment.