Back to index

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

List of all members.

Public Member Functions

def test_floats
def test_ints

Static Public Attributes

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

Detailed Description

Definition at line 17 of file

Member Function Documentation

Definition at line 6 of file

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

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)

Here is the call graph for this function:

Member Data Documentation

tuple test.json_tests.PyTest.dumps = staticmethod(pyjson.dumps) [static, inherited]

Definition at line 17 of file

test.json_tests.PyTest.json = pyjson [static, inherited]

Definition at line 15 of file

tuple test.json_tests.PyTest.loads = staticmethod(pyjson.loads) [static, inherited]

Definition at line 16 of file

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