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

Method addExpectedFailure

src/_pytest/unittest.py:261–270  ·  view source on GitHub ↗
(
        self,
        testcase: "unittest.TestCase",
        rawexcinfo: "_SysExcInfoType",
        reason: str = "",
    )

Source from the content-addressed store, hash-verified

259 self._addexcinfo(sys.exc_info())
260
261 def addExpectedFailure(
262 self,
263 testcase: "unittest.TestCase",
264 rawexcinfo: "_SysExcInfoType",
265 reason: str = "",
266 ) -> None:
267 try:
268 xfail(str(reason))
269 except xfail.Exception:
270 self._addexcinfo(sys.exc_info())
271
272 def addUnexpectedSuccess(
273 self,

Callers

nothing calls this directly

Calls 2

_addexcinfoMethod · 0.95
xfailFunction · 0.90

Tested by

no test coverage detected