diff options
| author | Bob Ippolito <bob@redivi.com> | 2009-03-17 23:19:00 (GMT) |
|---|---|---|
| committer | Bob Ippolito <bob@redivi.com> | 2009-03-17 23:19:00 (GMT) |
| commit | d914e3f8619df604ca6fa852fd210043b94f16e1 (patch) | |
| tree | 99352cdd395da08a735041039f7f336a92485f8d /Lib/json/tests/test_float.py | |
| parent | 277859d5910782cc31bb27f2472893b8382ad391 (diff) | |
| download | cpython-d914e3f8619df604ca6fa852fd210043b94f16e1.zip cpython-d914e3f8619df604ca6fa852fd210043b94f16e1.tar.gz cpython-d914e3f8619df604ca6fa852fd210043b94f16e1.tar.bz2 | |
merge json library with simplejson 2.0.9 (issue 4136)
Diffstat (limited to 'Lib/json/tests/test_float.py')
| -rw-r--r-- | Lib/json/tests/test_float.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/json/tests/test_float.py b/Lib/json/tests/test_float.py index 9df6d1ee..20d41d9 100644 --- a/Lib/json/tests/test_float.py +++ b/Lib/json/tests/test_float.py @@ -5,5 +5,11 @@ import json class TestFloat(TestCase): def test_floats(self): - for num in [1617161771.7650001, math.pi, math.pi**100, math.pi**-100]: + for num in [1617161771.7650001, math.pi, math.pi**100, math.pi**-100, 3.1]: self.assertEquals(float(json.dumps(num)), num) + self.assertEquals(json.loads(json.dumps(num)), num) + + def test_ints(self): + for num in [1, 1L, 1<<32, 1<<64]: + self.assertEquals(json.dumps(num), str(num)) + self.assertEquals(int(json.dumps(num)), num) |
