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

Method report_unexpected_exception

src/_pytest/doctest.py:209–224  ·  view source on GitHub ↗
(
            self,
            out,
            test: "doctest.DocTest",
            example: "doctest.Example",
            exc_info: Tuple[Type[BaseException], BaseException, types.TracebackType],
        )

Source from the content-addressed store, hash-verified

207 raise failure
208
209 def report_unexpected_exception(
210 self,
211 out,
212 test: "doctest.DocTest",
213 example: "doctest.Example",
214 exc_info: Tuple[Type[BaseException], BaseException, types.TracebackType],
215 ) -> None:
216 if isinstance(exc_info[1], OutcomeException):
217 raise exc_info[1]
218 if isinstance(exc_info[1], bdb.BdbQuit):
219 outcomes.exit("Quitting debugger")
220 failure = doctest.UnexpectedException(test, example, exc_info)
221 if self.continue_on_failure:
222 out.append(failure)
223 else:
224 raise failure
225
226 return PytestDoctestRunner
227

Callers

nothing calls this directly

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected