diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2016-11-15 15:07:15 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-11-15 09:07:15 -0500 |
| commit | 12f7928f5a455e330c0a7f19bc86b37baca12811 (patch) | |
| tree | faa5a385edfa69cc1e379a0ec02878f8ed9b85fd /tests/template_tests | |
| parent | 9e4fd3301d0a4e40cab8df4b51a2b04274f61da0 (diff) | |
Fixed #27394 -- Added scientific notation support for big integers in floatformat filter.
Diffstat (limited to 'tests/template_tests')
| -rw-r--r-- | tests/template_tests/filter_tests/test_floatformat.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/template_tests/filter_tests/test_floatformat.py b/tests/template_tests/filter_tests/test_floatformat.py index d2c39d3d48..b9724a2ff3 100644 --- a/tests/template_tests/filter_tests/test_floatformat.py +++ b/tests/template_tests/filter_tests/test_floatformat.py @@ -54,6 +54,10 @@ class FunctionTests(SimpleTestCase): self.assertEqual(floatformat('foo', 'bar'), '') self.assertEqual(floatformat('¿Cómo esta usted?'), '') self.assertEqual(floatformat(None), '') + self.assertEqual(floatformat(-1.323297138040798e+35, 2), '-132329713804079800000000000000000000.00') + self.assertEqual(floatformat(-1.323297138040798e+35, -2), '-132329713804079800000000000000000000') + self.assertEqual(floatformat(1.5e-15, 20), '0.00000000000000150000') + self.assertEqual(floatformat(1.5e-15, -20), '0.00000000000000150000') def test_zero_values(self): self.assertEqual(floatformat(0, 6), '0.000000') |
