PyDocs

Nav

Development Tools

call.call_list

  • call.call_list()
For a call object that represents multiple calls, `call_list`
returns a list of all the intermediate calls as well as the
final call.
1 Example
>>> m = MagicMock()
>>> m(1).method(arg='foo').other('bar')(2.0)
<MagicMock name='mock().method().other()()' id='...'>
>>> kall = call(1).method(arg='foo').other('bar')(2.0)
>>> kall.call_list()
[call(1),
 call().method(arg='foo'),
 call().method().other('bar'),
 call().method().other()(2.0)]
>>> m.mock_calls == kall.call_list()
True
from the Python docs
See Also
No see-alsos for unittest.mock/call.call_list
0 Notes
No notes for call.call_list