Hi Andrey,

On Fri, Jun 11, 2010 at 2:47 PM, Andrey Novoseltsev <novos...@gmail.com> wrote:

<SNIP>

> Where should such tests go? I am not sure that it is desirable to show
> 50 sophisticated examples for a single function in the interactive or
> compiled help. On the other hand, I really like when all the tests are
> right next to the body of the function. Is it possible to, say, have
> "EXAMPLES" and "TESTS" sections in the docstring and avoid showing
> "TESTS" by default? For the Sphynx documentation it would be nice to
> have a way to either "expand" this section on demand or have a link to
> the file with tests, in case someone really wants to see them...

Here are some possibilities:

* Define test functions with the name format
"_test_<rest-of-function-name>" and put test code in there. This way,
the test code and function won't show up in the reference manual.

* Put test code in a separate module and don't include that module in
the reference manual.

-- 
Regards
Minh Van Nguyen

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