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

Class _CallList

Lib/unittest/mock.py:374–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Used in the wild real call sites across dependent graphs

searching dependent graphs…