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

Method __init__

src/_pytest/recwarn.py:164–169  ·  view source on GitHub ↗
(self, *, _ispytest: bool = False)

Source from the content-addressed store, hash-verified

162 """
163
164 def __init__(self, *, _ispytest: bool = False) -> None:
165 check_ispytest(_ispytest)
166 # Type ignored due to the way typeshed handles warnings.catch_warnings.
167 super().__init__(record=True) # type: ignore[call-arg]
168 self._entered = False
169 self._list: List[warnings.WarningMessage] = []
170
171 @property
172 def list(self) -> List["warnings.WarningMessage"]:

Callers

nothing calls this directly

Calls 2

check_ispytestFunction · 0.90
__init__Method · 0.45

Tested by

no test coverage detected