doctest.UnexpectedException

exception doctest.UnexpectedException(test, example, exc_info)[source]

A DocTest example has encountered an unexpected exception

The exception instance has variables:

  • test: the DocTest object being run
  • example: the Example object that failed
  • exc_info: the exception info