Ondrej,

I believe the tools you want are

sage -coverage <files>
sage -coverageall

which you can find again listed when you do

sage -advanced

Rob

On Jun 21, 4:41 pm, Ondrej Certik <ond...@certik.cz> wrote:
> Hi,
>
> one of the rule for getting code into Sage is 100% doctesting --- what
> does it mean exactly?
> At least one doctest per function/method? Is there some tool to check
> that? I think I remember there was some script for it, but I can't
> find it now.
>
> However, at least to me, just one doctest per function is not enough,
> I like to have the code 100% tested, which is a completely different
> thing (but so far I didn't have much luck with automatic testing tools
> to test it, like figleaf or coverage, I'll try to look into it again,
> but I was curious if any of you have more experience with this). Also,
> should all tests go to the docstring? I remember asking William about
> it on IRC some time ago and he said it should (e.g. the TESTS section
> is not shown in the docstring in ipython with sage patches). I can't
> find the TESTS section here:
>
> http://sagemath.org/doc/developer/conventions.html
>
> but I thought I saw it somewhere (correct me if I am wrong).
>
> In sympy, for example for the Order() class (holding the order in the
> series expansion, e.g. the "O" term) has about 100 lines of tests. So
> in Sage you would just put all of them into the docstring?
>
> I however like that each function has at least one doctest showing the
> actual usage of the function, so once I write (or borrow from Sage)
> some script to automatically check that, I am going to impose that for
> all new code going to sympy (note again, that this is about the
> examples, the actual tests were always required). Because this shows
> very nice in the sphinx documentation.
>
> I am asking here, because you have the experience with holding all
> tests in the docstring itself, so I am curious about your opinion of
> it.
>
> Also a related question --- where exactly should the tests in the file
> "calculus/test_sympy.py" go?
>
> Thanks,
> Ondrej
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to