summaryrefslogtreecommitdiff
path: root/tests/template_tests
diff options
context:
space:
mode:
authorSky <sky@skychristensen.com>2019-10-31 09:24:31 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-10-31 10:07:59 +0100
commit459de8dc29a45a40f3c22cb63ebd2b82336f7192 (patch)
tree3252827834940c378a09f891ff0cc069fcbdaca6 /tests/template_tests
parent17752003a8c115ff79f5f21655f5e9b8b2af67f4 (diff)
Added more tests for floatformat filter with negative values.
Diffstat (limited to 'tests/template_tests')
-rw-r--r--tests/template_tests/filter_tests/test_floatformat.py2
1 files changed, 2 insertions, 0 deletions
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')