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

Method test_ordereddict

Lib/test/test_json/test_default.py:32–40  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

30 'when serializing type object'])
31
32 def test_ordereddict(self):
33 od = collections.OrderedDict(a=1, b=2, c=3, d=4)
34 od.move_to_end('b')
35 self.assertEqual(
36 self.dumps(od),
37 '{"a": 1, "c": 3, "d": 4, "b": 2}')
38 self.assertEqual(
39 self.dumps(od, sort_keys=True),
40 '{"a": 1, "b": 2, "c": 3, "d": 4}')
41
42
43class TestPyDefault(TestDefault, PyTest): pass

Callers

nothing calls this directly

Calls 3

move_to_endMethod · 0.95
assertEqualMethod · 0.45
dumpsMethod · 0.45

Tested by

no test coverage detected