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

Method __getattr__

tools/python-3.11.9-amd64/Lib/unittest/mock.py:305–309  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

303 self._sentinels = {}
304
305 def __getattr__(self, name):
306 if name == '__bases__':
307 # Without this help(unittest.mock) raises an exception
308 raise AttributeError
309 return self._sentinels.setdefault(name, _SentinelObject(name))
310
311 def __reduce__(self):
312 return 'sentinel'

Callers

nothing calls this directly

Calls 2

_SentinelObjectClass · 0.85
setdefaultMethod · 0.45

Tested by

no test coverage detected