On Tue, 2007-03-06 at 08:44 +0000, Gary S. Thompson wrote:
Edward d'Auvergne wrote:
snip
Also do you think that we should have a single unit test
file per relax module? I can see value in not enforcing this rule.
For example the 'specific_fns.model_free' module contains a very large
number of class methods. This could be better served by a directory
such as 'test_suite/unit_tests/specific_fns/model_free/' and allowing
that directory to have a separate unit test model per class methods
(each containing numerous tests of that one method). As each relax
function or method will require numerous tests for proper functioning,
proper throwing of RelaxErrors, etc, the unit test modules could
become quite large and unwieldy, especially if the self.setUp and
self.tearDown() methods need to be different for different
functions/methods.
It would be ideal to have one file per because then we can check for
basic coverage and overlooked unit tests. However there is nothing to
stop you adding imports to auxiliary classes to carry out the individual
tests....
Although I take the point about multiple tests, setUps and tearDowns per
method, I'd generally suggest that if the unit test file is getting too
unwieldy, the related module probably is too. So perhaps we should
enforce this rule, and split modules when neccessary, not split unit
test files. (still more work, still more breakages, but that might be
the cost of a manageable code base)
Chris