#23 Option to hide some of the doctests

closed
Epytext (19)
5
2008-01-31
2005-12-06
Anonymous
No

Some of the doctests are often used to perform testing
on the code rather than to document it with example. It
would be fine to be able to annotate these tests so
they are not included in the generated documentation.

For example, the second test below would be hidden:

>>> myfunction(example_argument)
normal_result
>>> myfunction(special_test_argument) # epydoc: hide
special_result

<pommereau@univ-paris12.fr>

Discussion

  • Edward Loper

    Edward Loper - 2006-01-25

    Logged In: YES
    user_id=195958

    I would recommend that you put these tests in a separate
    location. In my own experience, doctests are most useful
    when put in separate dedicated doctest files, containing
    prose interspersed with examples.

    That way, your source code will be more readable too,
    since these corner-case test cases will be moved out of
    the way.

    Alternatively, if you use ReST as your markup language,
    you could put the tests that you want to hide inside a
    ReST "comment" block.

     
  • Edward Loper

    Edward Loper - 2008-01-31
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks