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

Method test_array_hook

simplejson/tests/test_decode.py:118–121  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

116 self.assertRaises(ValueError, j.raw_decode, y, i)
117
118 def test_array_hook(self):
119 result = json.loads('[1, [2, 3], 4]', array_hook=tuple)
120 self.assertEqual(result, (1, (2, 3), 4))
121 self.assertIsInstance(result, tuple)
122
123 def test_array_hook_empty(self):
124 result = json.loads('[]', array_hook=tuple)

Callers

nothing calls this directly

Calls 1

loadsMethod · 0.80

Tested by

no test coverage detected