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

Method call_list

Lib/unittest/mock.py:2732–2742  ·  view source on GitHub ↗

For a call object that represents multiple calls, `call_list` returns a list of all the intermediate calls as well as the final call.

(self)

Source from the content-addressed store, hash-verified

2730
2731
2732 def call_list(self):
2733 """For a call object that represents multiple calls, `call_list`
2734 returns a list of all the intermediate calls as well as the
2735 final call."""
2736 vals = []
2737 thing = self
2738 while thing is not None:
2739 if thing._mock_from_kall:
2740 vals.append(thing)
2741 thing = thing._mock_parent
2742 return _CallList(reversed(vals))
2743
2744
2745call = _Call(from_kall=False)

Callers 6

test_mock_callsMethod · 0.80
test_assert_has_callsMethod · 0.80
test_extended_callMethod · 0.80
test_call_listMethod · 0.80

Calls 2

_CallListClass · 0.85
appendMethod · 0.45

Tested by 6

test_mock_callsMethod · 0.64
test_assert_has_callsMethod · 0.64
test_extended_callMethod · 0.64
test_call_listMethod · 0.64