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

Function _is_instance_mock

Lib/unittest/mock.py:71–74  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

69
70
71def _is_instance_mock(obj):
72 # can't use isinstance on Mock objects because they override __class__
73 # The base class for all mocks is NonCallableMock
74 return issubclass(type(obj), NonCallableMock)
75
76
77def _is_exception(obj):

Callers 9

_is_async_objFunction · 0.85
reset_mockFunction · 0.85
_check_and_set_parentFunction · 0.85
_mock_add_specMethod · 0.85
reset_mockMethod · 0.85
__setattr__Method · 0.85
__init__Method · 0.85
__enter__Method · 0.85
create_autospecFunction · 0.85

Calls 1

issubclassFunction · 0.85

Tested by

no test coverage detected