MCPcopy Index your code
hub / github.com/python/cpython / check_keys_reuse

Method check_keys_reuse

Lib/test/test_json/test_decode.py:97–101  ·  view source on GitHub ↗
(self, source, loads)

Source from the content-addressed store, hash-verified

95 self.assertEqual(rval, {"key":"value", "k":"v"})
96
97 def check_keys_reuse(self, source, loads):
98 rval = loads(source)
99 (a, b), (c, d) = sorted(rval[0]), sorted(rval[1])
100 self.assertIs(a, c)
101 self.assertIs(b, d)
102
103 def test_keys_reuse(self):
104 s = '[{"a_key": 1, "b_\xe9": 2}, {"a_key": 3, "b_\xe9": 4}]'

Callers 1

test_keys_reuseMethod · 0.95

Calls 2

loadsFunction · 0.50
assertIsMethod · 0.45

Tested by

no test coverage detected