summaryrefslogtreecommitdiff
path: root/tests/template_tests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-11-22 09:44:50 -0500
committerTim Graham <timograham@gmail.com>2016-11-22 09:47:12 -0500
commit41759c908240409d44fc11d07a562268c81f4bdf (patch)
treea701df2bcbfd6b265c5860ed4ec86693baea2ed3 /tests/template_tests
parent22a60f8d0b331bf06c066ccba4eea5bb5e4ac9f2 (diff)
Refs #27394 -- Removed @expectedFailure from a floatformat test.
Diffstat (limited to 'tests/template_tests')
-rw-r--r--tests/template_tests/filter_tests/test_floatformat.py11
1 files changed, 1 insertions, 10 deletions
diff --git a/tests/template_tests/filter_tests/test_floatformat.py b/tests/template_tests/filter_tests/test_floatformat.py
index b9724a2ff3..b1ffbe56c1 100644
--- a/tests/template_tests/filter_tests/test_floatformat.py
+++ b/tests/template_tests/filter_tests/test_floatformat.py
@@ -2,7 +2,6 @@
from __future__ import unicode_literals
from decimal import Decimal, localcontext
-from unittest import expectedFailure
from django.template.defaultfilters import floatformat
from django.test import SimpleTestCase
@@ -58,6 +57,7 @@ class FunctionTests(SimpleTestCase):
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')
+ self.assertEqual(floatformat(1.00000000000000015, 16), '1.0000000000000002')
def test_zero_values(self):
self.assertEqual(floatformat(0, 6), '0.000000')
@@ -97,12 +97,3 @@ class FunctionTests(SimpleTestCase):
self.assertEqual(floatformat(15.2042, '-3'), '15.204')
self.assertEqual(floatformat(Decimal('1.2345'), 2), '1.23')
self.assertEqual(floatformat(Decimal('15.2042'), -3), '15.204')
-
- def test_many_zeroes(self):
- self.assertEqual(floatformat(1.00000000000000015, 16), '1.0000000000000002')
-
- if six.PY2:
- # The above test fails because of Python 2's float handling. Floats
- # with many zeroes after the decimal point should be passed in as
- # another type such as unicode or Decimal.
- test_many_zeroes = expectedFailure(test_many_zeroes)