summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-02-08 21:00:43 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2014-02-08 21:01:55 +0100
commit07ae47f7f8b5d5f80238ea3018163cad12917852 (patch)
treeaa2d52c30bc56767e0afb9c5ecde31077fea8214 /tests
parent5d263dee304fdaf95e18d2f0619d6925984a7f02 (diff)
Fixed #21959 -- Handled Inf/NaN in widthratio tag.
Thanks rmoe for the report and the patch.
Diffstat (limited to 'tests')
-rw-r--r--tests/template_tests/tests.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/template_tests/tests.py b/tests/template_tests/tests.py
index 8e73e91693..9cd29f8fa5 100644
--- a/tests/template_tests/tests.py
+++ b/tests/template_tests/tests.py
@@ -1668,6 +1668,8 @@ class TemplateTests(TestCase):
'widthratio18': ('{% widthratio a b 100 as %}', {}, template.TemplateSyntaxError),
'widthratio19': ('{% widthratio a b 100 not_as variable %}', {}, template.TemplateSyntaxError),
+ 'widthratio20': ('{% widthratio a b 100 %}', {'a': float('inf'), 'b': float('inf')}, ''),
+ 'widthratio21': ('{% widthratio a b 100 %}', {'a': float('inf'), 'b': 2}, ''),
### WITH TAG ########################################################
'with01': ('{% with key=dict.key %}{{ key }}{% endwith %}', {'dict': {'key': 50}}, '50'),