From a2ac50f1572edd52ac8002a7b03db58a8babf4da Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Thu, 30 Jan 2020 18:16:38 +0100 Subject: [PATCH] Added regression test for slicing of attributes --- tests/test_async.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_async.py b/tests/test_async.py index f7e27922e..5f6e073a4 100644 --- a/tests/test_async.py +++ b/tests/test_async.py @@ -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"