MCPcopy Index your code
hub / github.com/python/cpython / _addExpectedFailure

Method _addExpectedFailure

Lib/unittest/case.py:575–583  ·  view source on GitHub ↗
(self, result, exc_info)

Source from the content-addressed store, hash-verified

573 self._subtest = parent
574
575 def _addExpectedFailure(self, result, exc_info):
576 try:
577 addExpectedFailure = result.addExpectedFailure
578 except AttributeError:
579 warnings.warn("TestResult has no addExpectedFailure method, reporting as passes",
580 RuntimeWarning)
581 result.addSuccess(self)
582 else:
583 addExpectedFailure(self, exc_info)
584
585 def _addUnexpectedSuccess(self, result):
586 try:

Callers 1

runMethod · 0.95

Calls 2

warnMethod · 0.45
addSuccessMethod · 0.45

Tested by

no test coverage detected