[Numpy-discussion] Doctest items

Robert Kern robert.kern at gmail.com
Tue Jul 1 16:12:24 EDT 2008


On Tue, Jul 1, 2008 at 14:39, Charles R Harris
<charlesr.harris at gmail.com> wrote:
>
> On Tue, Jul 1, 2008 at 1:30 PM, Alan McIntyre <alan.mcintyre at gmail.com>
> wrote:
>>
>> On Tue, Jul 1, 2008 at 3:20 PM, Robert Kern <robert.kern at gmail.com> wrote:
>> > Can it work on an entire section? If not, can we do something that
>> > works on a whole section? Everything after "Plot the window and its
>> > frequency response:" is not required for testing.
>>
>> It's on a per-line basis at the moment, so each lines needs a
>> "#doctest: +SKIP".  Changing a directive to apply to multiple lines
>> probably isn't trivial (I haven't really looked into doing that,
>> though).
>>
>> We could always just make the plotting section one of those "it's just
>> an example not a doctest" things and remove the ">>>" (since it
>> doesn't appear to provide any useful test coverage or anything).
>
> Would it serve to overload plot with a function that does zippo?

If it's not going to test anything, I would prefer that it not be part
of the tests. Admittedly, that's just my sense of aesthetics, not a
technical objection.

A technical objection would be that some of the matplotlib functions
actually do return something, and we would still have to uglify the
examples with the ellipsis stuff.

-- 
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