[Numpy-discussion] doctests failing in ipython

Robert Kern robert.kern at gmail.com
Fri Jul 11 03:29:16 EDT 2008


On Fri, Jul 11, 2008 at 02:11, Charles R Harris
<charlesr.harris at gmail.com> wrote:
> The problem is the Out[#] appended to the output.
>
> ................................................Out[4]: poly1d([ 1.,  2.,
> 3.])
> **********************************************************************
> File "/usr/lib/python2.5/site-packages/numpy/lib/tests/test_polynomial.py",
> line 6, in test_polynomial
> Failed example:
>     p
> Expected:
>     poly1d([ 1.,  2.,  3.])
> Got nothing
>
> Tons of these.

Yes. This is well-known. IPython cannot run doctests in general
without modification. This is not a bug in numpy's tests; just an
incompatibility between IPython and doctest.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco



More information about the NumPy-Discussion mailing list