From 459de8dc29a45a40f3c22cb63ebd2b82336f7192 Mon Sep 17 00:00:00 2001 From: Sky Date: Thu, 31 Oct 2019 09:24:31 +0100 Subject: [PATCH] Added more tests for floatformat filter with negative values. --- tests/template_tests/filter_tests/test_floatformat.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/template_tests/filter_tests/test_floatformat.py b/tests/template_tests/filter_tests/test_floatformat.py index cfc3eaf73b..9cb838854c 100644 --- a/tests/template_tests/filter_tests/test_floatformat.py +++ b/tests/template_tests/filter_tests/test_floatformat.py @@ -26,7 +26,9 @@ class FunctionTests(SimpleTestCase): self.assertEqual(floatformat(7.7), '7.7') self.assertEqual(floatformat(7.0), '7') self.assertEqual(floatformat(0.7), '0.7') + self.assertEqual(floatformat(-0.7), '-0.7') self.assertEqual(floatformat(0.07), '0.1') + self.assertEqual(floatformat(-0.07), '-0.1') self.assertEqual(floatformat(0.007), '0.0') self.assertEqual(floatformat(0.0), '0') self.assertEqual(floatformat(7.7, 0), '8')