MCPcopy Index your code
hub / github.com/RustPython/RustPython / check_keys_reuse

Method check_keys_reuse

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

Source from the content-addressed store, hash-verified

80 self.assertEqual(rval, {"key":"value", "k":"v"})
81
82 def check_keys_reuse(self, source, loads):
83 rval = loads(source)
84 (a, b), (c, d) = sorted(rval[0]), sorted(rval[1])
85 self.assertIs(a, c)
86 self.assertIs(b, d)
87
88 def test_keys_reuse(self):
89 s = '[{"a_key": 1, "b_\xe9": 2}, {"a_key": 3, "b_\xe9": 4}]'

Callers 1

test_keys_reuseMethod · 0.95

Calls 3

sortedFunction · 0.85
loadsFunction · 0.50
assertIsMethod · 0.45

Tested by

no test coverage detected