summaryrefslogtreecommitdiff
path: root/simplejson/tests/test_float.py
diff options
context:
space:
mode:
Diffstat (limited to 'simplejson/tests/test_float.py')
-rw-r--r--simplejson/tests/test_float.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/simplejson/tests/test_float.py b/simplejson/tests/test_float.py
index bcec143..82b2285 100644
--- a/simplejson/tests/test_float.py
+++ b/simplejson/tests/test_float.py
@@ -1,6 +1,9 @@
-import simplejson
import math
+from unittest import TestCase
-def test_floats():
- for num in [1617161771.7650001, math.pi, math.pi**100, math.pi**-100]:
- assert float(simplejson.dumps(num)) == num
+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)