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

Method addExpectedFailure

src/_pytest/unittest.py:347–356  ·  src/_pytest/unittest.py::TestCaseFunction.addExpectedFailure
(
        self,
        testcase: unittest.TestCase,
        rawexcinfo: _SysExcInfoType,
        reason: str = "",
    )

Source from the content-addressed store, hash-verified

345 add_skip()
346
347 def addExpectedFailure(
348 self,
349 testcase: unittest.TestCase,
350 rawexcinfo: _SysExcInfoType,
351 reason: str = class="st">"",
352 ) -> None:
353 try:
354 xfail(str(reason))
355 except xfail.Exception:
356 self._addexcinfo(sys.exc_info())
357
358 def addUnexpectedSuccess(
359 self,

Callers

nothing calls this directly

Calls 1

_addexcinfoMethod · 0.95

Tested by

no test coverage detected