Back to index

python3.2  3.2.2
Public Member Functions | Static Public Attributes
test.json_tests.test_float.TestCFloat Class Reference
Inheritance diagram for test.json_tests.test_float.TestCFloat:
Inheritance graph
[legend]
Collaboration diagram for test.json_tests.test_float.TestCFloat:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_floats
def test_ints

Static Public Attributes

 json = cjson
tuple loads = staticmethod(cjson.loads)
tuple dumps = staticmethod(cjson.dumps)

Detailed Description

Definition at line 18 of file test_float.py.


Member Function Documentation

Definition at line 6 of file test_float.py.

00006 
00007     def test_floats(self):
00008         for num in [1617161771.7650001, math.pi, math.pi**100, math.pi**-100, 3.1]:
00009             self.assertEqual(float(self.dumps(num)), num)
00010             self.assertEqual(self.loads(self.dumps(num)), num)

Here is the call graph for this function:

Definition at line 11 of file test_float.py.

00011 
00012     def test_ints(self):
00013         for num in [1, 1<<32, 1<<64]:
00014             self.assertEqual(self.dumps(num), str(num))
00015             self.assertEqual(int(self.dumps(num)), num)
00016 

Here is the call graph for this function:


Member Data Documentation

tuple test.json_tests.CTest.dumps = staticmethod(cjson.dumps) [static, inherited]

Definition at line 24 of file __init__.py.

test.json_tests.CTest.json = cjson [static, inherited]

Definition at line 22 of file __init__.py.

tuple test.json_tests.CTest.loads = staticmethod(cjson.loads) [static, inherited]

Definition at line 23 of file __init__.py.


The documentation for this class was generated from the following file: