On Wed, Jun 30, 2010 at 11:20 AM, Robert Miller <r...@rlmiller.org> wrote:
> On Wed, Jun 30, 2010 at 10:01 AM, William Stein <wst...@gmail.com> wrote:
>> On Wed, Jun 30, 2010 at 9:48 AM, Robert Miller <r...@rlmiller.org> wrote:
>>> I was recently searching through the source and I noticed that some
>>> loads/dumps doctests say #indirect doctest, and others don't. I know
>>> that for __reduce__ methods, this is correct, but it struck me that
>>> perhaps all loads/dumps doctests are indirect. I guess this is a
>>> philosophical/moral question, but I wanted to get other people's
>>> opinions... What do y'all think?
>>
>> Clearly, all but two of them are indirect (the two that test the loads
>> and dumps functions!).
>
> How very correct. That was my thinking as well. Although I suppose
> this is strictly pedantic, since the coverage/doctesting scripts don't
> care about the distinction. Coverage just looks for a loads(dumps test
> in each class, and doctesting doesn't care, so I don't see a point in
> fixing this, other than to be consistent.
>
> NB There are many of these types of tests which are not marked as indirect.
>
> Should I open a ticket, or find something more productive to do?

I think all special methods should be implicitly indirect, which
includes loads/dumps (usually doctested in __reduce__, though
sometimes it's worth calling __reduce__ directly).

The only reason #indirect is there is to silence the coverage script
warnings that you don't appear to be using the function that you're
supposedly testing.

- Robert

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to