[IPython-dev] Testing cleanup and support committed

Fernando Perez fperez.net@gmail....
Sun Jul 6 21:10:36 CDT 2008


Hi all,

I've just added

http://bazaar.launchpad.net/~ipython/ipython/trunk/revision/1038

the nose support for ipython doctests and doctests in extension code.
I also cleaned up a  bunch of things from old testing stuff that we
had.  It's NOT finished, there's one piece of  the puzzle that I still
want to have done, which is the ability to run regular reST files with
doctests AND code blocks, where the code blocks are executed and
considered to succeed as long as they don't raise,  but the doctests
are still executed as such.  This last piece would let us run all our
examples in the new documentation, even if they have significant bits
of code,  as part of the test suite.

The plugin directory has a little makefile for temporary testing, it's
just a handy way to keep a note of the command you need to run  while
debugging.  Eventually the (unfinished) iptest script that's there
will provide this functionality, and it will not be necessary to
actually install the plugin.

But the nice thing is that now it is trivial to have entire ipython
sessions copy/pasted from a terminal into either a docstring or a reST
file as a codeblock, and it's automatically a test.  Even though I'm
now busy for a few days at a a conference (with the python talk yet to
be written :) I wanted this out so others could play with it.

It is NOT meant to cleanly test all of ipython yet,  but we'll get
there soon.  And once we're happy with the functionality, I hope we'll
all use this to properly butress any refactoring BEFORE breaking
anything with good tests.

For years the main (terminal) ipython had suffered  tremendously from
the lack of solid testing.  I hope this is a first step to remedy that
problem.

Cheers,

f


More information about the IPython-dev mailing list