Run and debug doctest in IPython
Switch branches/tags
Nothing to show
Latest commit 4c61b28 Mar 24, 2014 @tkf Merge pull request #1 from jalanb/master
New "--file" and "--options" options for doctestmagic
Failed to load latest commit information.
README use spaces, not tabs Jan 30, 2014 Show extra option in README Jan 30, 2014


%doctest [-n NAME] [-v] [-x] object [object ...]

Run doctest of given objects.


  %doctest some_object other_object  # run doctest for several objects
  %doctest -v some_object            # verbose ouput
  %doctest -x some_object            # debug doctest

Use the cell magic version of this magic command (``%%doctest``)
to write doctest directly in IPython shell.

positional arguments:
  object                Doctest is ran against docstrings of this object.

optional arguments:
  -n NAME, --name NAME           See :func:`doctest.run_docstring_examples`.
  -f, --file                     The object to be tested is a (path to a) file
  -o OPTION, --options OPTION    Pass on options to doctest
  -v, --verbose                  See :func:`doctest.run_docstring_examples`.
  -x, --stop                     Stop testing after the first error or failure.
                                 When this option is used, the error is stored
                                 in IPython shell so that you can debug it by
                                 turning on pdb flag before doctest (see
                                 ``%pdb``) or use ``%debug`` magic command