MCPcopy Create free account
hub / github.com/pytest-dev/pytest / __getattr__

Method __getattr__

src/pytest/collect.py:31–35  ·  view source on GitHub ↗
(self, name: str)

Source from the content-addressed store, hash-verified

29 return dir(super()) + self.__all__
30
31 def __getattr__(self, name: str) -> Any:
32 if name not in self.__all__:
33 raise AttributeError(name)
34 warnings.warn(PYTEST_COLLECT_MODULE.format(name=name), stacklevel=2)
35 return getattr(pytest, name)
36
37
38sys.modules["pytest.collect"] = FakeCollectModule()

Callers

nothing calls this directly

Calls 2

warnMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected