On Jan 31, 1:15 pm, William Stein <[email protected]> wrote:
> On Sat, Jan 30, 2010 at 9:10 PM, Dima Pasechnik <[email protected]> wrote:
>
> > On Jan 30, 1:46 pm, Robert Bradshaw <[email protected]>
> > wrote:
> >> On Jan 29, 2010, at 9:27 PM, Dima Pasechnik wrote:
>
> >> > William,
> >> > I think TESTS:: would be a good idea!
> >> > Having an optional part TESTS:: where one can put more or less any
> >> > Sage code; if TESTS:: is present,
> >> > EXAMPLES:: is ignored, and otherwise EXAMPLES:: play the role of
> >> > TESTS::
>
> >> We already use TESTS blocks. Both should be tested if both exist.
>
> > Is there a docstrings-like option to use in order to tell the system
> > not to test things in EXAMPLES:: ?
>
> > Dima
>
> Put "# not tested" as a comment.
>
> That said, unless there is a very, very, very good reason, everything
> in EXAMPLES should get tested.   It's absolutely terrible to have
> examples that don't work precisely the way we say they do in the
> documentation.    I would definitely not positively review any code
> that makes frivolous use of "# not tested".
>
well, I just test what is in EXAMPLES in TESTS (as string comparison
fails here, I have to write a bit of code to test properly)
It's a bit ugly, but it's a limitation of docstinsg that is impossible
to overcome.

(Please see http://trac.sagemath.org/sage_trac/ticket/8150 for the
corresponding patch)

Dmitrii

> There is also a "# random" marker that one can put on doctests.  It
> also should be avoided...
>
> William

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

Reply via email to