MCPcopy Create free account
hub / github.com/simplejson/simplejson / test_ints

Method test_ints

simplejson/tests/test_float.py:34–39  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

32 self.assertEqual(json.loads(text_type(json.dumps(num))), num)
33
34 def test_ints(self):
35 for num in [1, long_type(1), 1<<32, 1<<64]:
36 self.assertEqual(json.dumps(num), str(num))
37 self.assertEqual(int(json.dumps(num)), num)
38 self.assertEqual(json.loads(json.dumps(num)), num)
39 self.assertEqual(json.loads(text_type(json.dumps(num))), num)
40
41 def test_float_range(self):
42 try:

Callers

nothing calls this directly

Calls 2

dumpsMethod · 0.80
loadsMethod · 0.80

Tested by

no test coverage detected