[BioPython] Proposal: doctest for biopython

Giovanni Marco Dall'Olio dalloliogm at gmail.com
Tue Nov 4 10:58:41 UTC 2008


Hi!!

I would like to propose to use doctest tests in biopython.
I found them very useful to understand how a script should be used, and
moreover they can act as test units.

I have just posted a patch file to that adds doctest documentation to
Bio/SeqRecordIO:
- http://bugzilla.open-bio.org/show_bug.cgi?id=2640

What do you think of it?


Here it is the main documentation for unittest:
- http://www.python.org/doc/2.5.2/lib/module-doctest.html

Usually, you add a _test() function to every module, which calls the unittest
libraries, and launch it with __name__ == '__main__'.

The most significative example is added to the documentation string of every
module/function, and tested with doctest.testmod(); later, you add more tests
in a separate file, and launch them with doctest.testfile().

--
-----------------------------------------------------------

My Blog on Bioinformatics (italian): http://bioinfoblog.it



More information about the Biopython mailing list