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

Method addError

src/_pytest/unittest.py:240–248  ·  view source on GitHub ↗
(
        self, testcase: "unittest.TestCase", rawexcinfo: "_SysExcInfoType"
    )

Source from the content-addressed store, hash-verified

238 self.__dict__.setdefault("_excinfo", []).append(excinfo)
239
240 def addError(
241 self, testcase: "unittest.TestCase", rawexcinfo: "_SysExcInfoType"
242 ) -> None:
243 try:
244 if isinstance(rawexcinfo[1], exit.Exception):
245 exit(rawexcinfo[1].msg)
246 except TypeError:
247 pass
248 self._addexcinfo(rawexcinfo)
249
250 def addFailure(
251 self, testcase: "unittest.TestCase", rawexcinfo: "_SysExcInfoType"

Calls 2

_addexcinfoMethod · 0.95
exitFunction · 0.90

Tested by

no test coverage detected