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

Method __get_side_effect

Lib/unittest/mock.py:616–625  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

614
615
616 def __get_side_effect(self):
617 delegated = self._mock_delegate
618 if delegated is None:
619 return self._mock_side_effect
620 sf = delegated.side_effect
621 if (sf is not None and not callable(sf)
622 and not isinstance(sf, _MockIter) and not _is_exception(sf)):
623 sf = _MockIter(sf)
624 delegated.side_effect = sf
625 return sf
626
627 def __set_side_effect(self, value):
628 value = _try_iter(value)

Callers

nothing calls this directly

Calls 2

_is_exceptionFunction · 0.85
_MockIterClass · 0.85

Tested by

no test coverage detected