[BioPython] question regarding testing suites
Andrew Dalke
dalke at dalkescientific.com
Sat Jun 9 14:42:54 UTC 2007
Hi Ann! (And other BioPython folk)
On Jun 9, 2007, at 4:16 PM, Ann Loraine wrote:
> would you recommend I use [unittest], or do you think there are
> some other frameworks I should investigate, as well?
Use "nose" from http://somethingaboutorange.com/mrl/projects/nose/
which lets you develop tests using unittest *and* other ways.
There are two aspects you should be aware of: unit tests
and and unit test discovery. You gotta write the tests and
you gotta run the tests.
unittest.py does both. Derive from TestCase, write methods
starting with "test_" and the unittest.main() can auto-discover
everything.
The downsides are "unittest"'s discovery doesn't support:
- simple functions (when it's silly to make a class for
two lines of code)
- doctests
- running all/a subset of your unittests across multiple files.
The nose system also has support for things like
checking execution time and doing coverage tests.
Andrew
dalke at dalkescientific.com
More information about the Biopython
mailing list