[IPython-dev] Doctest fixes, testing release out

Fernando Perez fperez.net at gmail.com
Sun Sep 9 06:23:12 EDT 2007


On 9/8/07, Jörgen Stenarson <jorgen.stenarson at bostream.nu> wrote:
> Fernando Perez skrev:
> > On 8/23/07, Jörgen Stenarson <jorgen.stenarson at bostream.nu> wrote:
> >
> >>> No, it should just work.  I'm a bit swamped right now, but I'll look
> >>> into it as soon as I can.  I want all doctest functionality to really
> >>> 'just work', no fuss.
> >
> > OK, I got this code in along with other things I had pending for
> > 0.8.2.  Let me know what you see...
> >
> > Cheers,
> >
> > f
> >
> Unfortunately I still see problems (rev 2741). There is no traceback and
> a doctest call seems to work but it does not report any errors.

OK, let me know how it goes now...  Your test passes:

In [1]: run try_doctest.py
**********************************************************************
File "try_doctest.py", line 6, in __main__.a
Failed example:
    a(10)
Expected:
    11x
Got:
    11
**********************************************************************
1 items had failures:
   1 of   2 in __main__.a
***Test Failed*** 1 failures.

In [2]: !python try_doctest.py
**********************************************************************
File "try_doctest.py", line 6, in __main__.a
Failed example:
    a(10)
Expected:
    11x
Got:
    11
**********************************************************************
1 items had failures:
   1 of   2 in __main__.a
***Test Failed*** 1 failures.

In [3]:


The patch was in the end very small (in fact I reduced code), but it
touches fairly delicate parts of the execution of files, that are
prone to subtle complications.  And it took me a while to understand
what I had to do, so I may have missed a corner case and shot myself
in the foot.

Extensive testing would be much appreciated.

Cheers,

f



More information about the IPython-dev mailing list