summaryrefslogtreecommitdiffstats
path: root/Lib/json/tests/test_float.py
blob: 9df6d1ee7aa4e6268bdb98895d2568b49fea5a7e (plain)
1
2
3
4
5
6
7
8
9
import math
from unittest import TestCase

import json

class TestFloat(TestCase):
    def test_floats(self):
        for num in [1617161771.7650001, math.pi, math.pi**100, math.pi**-100]:
            self.assertEquals(float(json.dumps(num)), num)