You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
272 B
10 lines
272 B
13 years ago
|
import math
|
||
|
from unittest import TestCase
|
||
|
|
||
|
from pyutil import jsonutil as 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)
|