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

Method test_kwargs_order

Lib/test/test_call.py:37–48  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

35class FunctionCalls(unittest.TestCase):
36
37 def test_kwargs_order(self):
38 # bpo-34320: **kwargs should preserve order of passed OrderedDict
39 od = collections.OrderedDict([('a', 1), ('b', 2)])
40 od.move_to_end('a')
41 expected = list(od.items())
42
43 def fn(**kw):
44 return kw
45
46 res = fn(**od)
47 self.assertIsInstance(res, dict)
48 self.assertEqual(list(res.items()), expected)
49
50 def test_frames_are_popped_after_failed_calls(self):
51 # GH-93252: stuff blows up if we don't pop the new frame after

Callers

nothing calls this directly

Calls 7

move_to_endMethod · 0.95
itemsMethod · 0.95
listClass · 0.85
fnFunction · 0.85
assertIsInstanceMethod · 0.80
assertEqualMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected