Skip to content

Commit

Permalink
Added regression test for slicing of attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko authored and davidism committed Jan 30, 2020
1 parent 05dee9b commit 15d7e61
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_async.py
Expand Up @@ -579,3 +579,7 @@ def test_nonrecursive_loop_filter(self, test_env_async):
def test_bare_async(self, test_env_async):
t = test_env_async.from_string('{% extends "header" %}')
assert t.render(foo=42) == "[42|23]"

def test_awaitable_property_slicing(self, test_env_async):
t = test_env_async.from_string("{% for x in a.b[:1] %}{{ x }}{% endfor %}")
assert t.render(a=dict(b=[1, 2, 3])) == "1"

0 comments on commit 15d7e61

Please sign in to comment.