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

Class _CallList

Lib/unittest/mock.py:373–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371
372
373class _CallList(list):
374
375 def __contains__(self, value):
376 if not isinstance(value, list):
377 return list.__contains__(self, value)
378 len_value = len(value)
379 len_self = len(self)
380 if len_value > len_self:
381 return False
382
383 for i in range(0, len_self - len_value + 1):
384 sub_list = self[i:i+len_value]
385 if sub_list == value:
386 return True
387 return False
388
389 def __repr__(self):
390 return pprint.pformat(list(self))
391
392
393def _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