On Fri, May 21, 2010 at 02:19:37PM -0700, John H Palmieri wrote:
> If I'm defining a new class and I want to implement a TestSuite for
> it, well, there is some stuff built in, but I should perhaps also add
> methods called "_test_X" for various values of X. If I doctest these
> via
>
> sage: object._test_X()
>
> then the same doctest will get run twice: once here, and once when I
> do "TestSuite(object)" elsewhere in the file. Should this be
> avoided? I need to included doctests for 100% coverage. Should I
> mark the doctest for _test_X as "not tested" to skip this?
>
> sage: object._test_X() # not tested
>
> I'm writing some methods for a test suite which may take a few
> seconds, and I don't want to double this for no reason...
I had not run into this use case yet. Without time issue, I would just
run the test twice. Otherwise, you could possibly mark the doctest as
long?
sage: object._test_X() # long
Cheers,
Nicolas
--
Nicolas M. ThiƩry "Isil" <[email protected]>
http://Nicolas.Thiery.name/
--
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