blob: 82b22858f63cdc9c8ba67bf9d108053bd43433f0 (
plain)
1
2
3
4
5
6
7
8
9
|
import math
from unittest import TestCase
import simplejson as S
class TestFloat(TestCase):
def test_floats(self):
for num in [1617161771.7650001, math.pi, math.pi**100, math.pi**-100]:
self.assertEquals(float(S.dumps(num)), num)
|