[Biopython-dev] [Bug 2749] Proposal: a template for biopython's unittests

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Wed Feb 4 21:58:51 UTC 2009


http://bugzilla.open-bio.org/show_bug.cgi?id=2749





------- Comment #4 from dalloliogm at gmail.com  2009-02-04 16:58 EST -------
>  (In reply to comment #1)
>  > The current view from the Biopython developers is that we don't want to depend
>  > on nose for running our unit tests (nose is not installed automatically as part
>  > of python).  This has been discussed on the mailing list, so I won't repeat
>  > myself here.
>  
>  Also, the test framework must support Python 2.3 while Biopython supports it.
>  
>  Really I find that the huge diversity in Biopython prevents a 'single' template
>  that is sufficiently easy to follow. 

ok, but you should give to new developers at least some guidelines on how they
should write tests, documentation, and code.
The fact that the tests in biopython are so various is not a positive point, it
make it difficult to understand and to maintain them, especially for newcomers.


>  I do not like the splitting that test into
>  setups for each 'subtest' followed by a general test. 

Well, it is a matter of taste, I think.
I find it elegant and rather clear: you can easily see in which conditions and
environment every test is run, the code in every test method is reducted to the
minimum, and you clean everything after the execution of the first test, so the
order in which the tests are executed doesn't count.


>  This starts to get rather
>  difficult to read and manage when you have modules like the sequence object
>  involve many different tasks that require a separate setup for each test as
>  well as the actual test. 

You should put those in a different test module.
Every test unit is a particular use case: for example, look at my example,
where the first unit test is a simple sequence, and the second (subclassed) is
a blank one.


>  A related problem is that certain tests may require a
>  specific exception for a specific situation.

mmm what do you mean, exactly?


>  Another problem is that some of the tests are very similar for the same module
>  (say Logistic regression or testing alphabets in reading sequences into a Seq
>  object) so it makes more sense to do what numpy does
>  (http://projects.scipy.org/scipy/numpy/wiki/TestingGuidelines ) where the same
>  test function is used with different inputs. 

That will be difficult to do until you are so convinced against using nose :(.


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list