MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _CallList

Class _CallList

tools/python-3.11.9-amd64/Lib/unittest/mock.py:348–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346
347
348class _CallList(list):
349
350 def __contains__(self, value):
351 if not isinstance(value, list):
352 return list.__contains__(self, value)
353 len_value = len(value)
354 len_self = len(self)
355 if len_value > len_self:
356 return False
357
358 for i in range(0, len_self - len_value + 1):
359 sub_list = self[i:i+len_value]
360 if sub_list == value:
361 return True
362 return False
363
364 def __repr__(self):
365 return pprint.pformat(list(self))
366
367
368def _check_and_set_parent(parent, value, name, new_name):

Callers 10

reset_mockFunction · 0.85
_setup_funcFunction · 0.85
_setup_async_mockFunction · 0.85
__init__Method · 0.85
reset_mockMethod · 0.85
assert_has_callsMethod · 0.85
__init__Method · 0.85
assert_has_awaitsMethod · 0.85
reset_mockMethod · 0.85
call_listMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected