MCPcopy
hub / github.com/pytest-dev/pytest / errisinstance

Method errisinstance

src/_pytest/_code/code.py:683–688  ·  view source on GitHub ↗

Return True if the exception is an instance of exc. Consider using ``isinstance(excinfo.value, exc)`` instead.

(self, exc: EXCEPTION_OR_MORE)

Source from the content-addressed store, hash-verified

681 return text
682
683 def errisinstance(self, exc: EXCEPTION_OR_MORE) -> bool:
684 """Return True if the exception is an instance of exc.
685
686 Consider using ``isinstance(excinfo.value, exc)`` instead.
687 """
688 return isinstance(self.value, exc)
689
690 def _getreprcrash(self) -> ReprFileLocation | None:
691 # Find last non-hidden traceback entry that led to the exception of the

Callers 2

test_pytest_exitFunction · 0.80

Calls

no outgoing calls

Tested by 2

test_pytest_exitFunction · 0.64