Coverage for /home/runner/work/viur-core/viur-core/viur/src/viur/core/render/html/env/tests.py: 0%

9 statements  

« prev     ^ index     » next       coverage.py v7.6.3, created at 2024-10-16 22:16 +0000

1import typing as t 

2 

3from ..default import Render 

4from ..utils import jinjaGlobalTest 

5 

6 

7@jinjaGlobalTest("dict") 

8def test_dict(render: Render, value: t.Any) -> bool: 

9 """Jinja2 test: Return True if the object is a dict.""" 

10 return isinstance(value, dict) 

11 

12 

13@jinjaGlobalTest("list") 

14def test_list(render: Render, value: t.Any) -> bool: 

15 """Jinja2 test: Return True if the object is a list.""" 

16 return isinstance(value, list)