[Biopython-dev] Rethinking Biopython's testing framework

Giovanni Marco Dall'Olio dalloliogm at gmail.com
Fri Dec 26 17:52:58 UTC 2008


On Fri, Dec 26, 2008 at 3:32 PM, Michiel de Hoon <mjldehoon at yahoo.com> wrote:
> --- On Thu, 12/25/08, Giovanni Marco Dall'Olio <dalloliogm at gmail.com> wrote:
>> Some people suggested me the nose python framework:
>> - http://somethingaboutorange.com/mrl/projects/nose/
>>
>> It is used by many other open source projects, like
>> sqlalchemy and elixir.
>> I haven't tried it but I think it does more or less
>> everything you
>> said automatically, we could try to adopt it.
>
> If we use nose, does that mean adding another dependency to Biopython? If so, I don't think it's worth it. If not, how does this work?

nose is a testing framework, so it is a dependency only for developers.
I have been able to install sqlalchemy and elixir (projects that make
use of nose) without having to install this framework first.

The docs on nose's website can explain its usage better than me.
Basically, you have to install nose (easy_install nose) and then run
it as a shell command (nosetests).
It automatically reads all the files in the current directory and
subdirectories, collects all the methods/classes/etc whose name begins
or ends with 'test_' (_test), plus any unittest, and execute them. It
can also read doctests, it is possible to write plugins and apply an
high degree of customization.
I tried to run it over the latest biopython cvs, and it already
highlighted some problems (a few modules still using Martel, etc).

I forgot to say that this project is also hosted on google/code:
- http://code.google.com/p/python-nose/
You can find more information in the docs:
- http://code.google.com/p/python-nose/wiki/FindingAndRunningTests


p.p.s. Even if it was a dependency, I think it is worth to use it
anyway, rather than rewriting existing code.

> --Michiel.
>
>
>
>



-- 

My blog on bioinformatics (now in English): http://bioinfoblog.it



More information about the Biopython-dev mailing list