mailRe: unit tests vs... the current test_suite


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Gary S. Thompson on October 31, 2006 - 11:46:
Edward d'Auvergne wrote:

On 10/31/06, Andrew Perry <ajperry@xxxxxxxxxxxxxx> wrote:


(responding to essentially the entire thread)

I've been following the Biopython project for a few years, and in my mind
this project is a reasonable example of how unit tests in python can be
used.


The Biopython tests are organised like:

Tests/test_Fred.py

with all tests in one directory, separate from the modules that are being
tested, and using the naming scheme that Gary suggests.


They also hold any data required for input/comparison for the tests in
subdirectories under the Tests directory, named module-wise like:

Tests/Fred/fred_input_data_001.dat
Tests/Fred/fred_input_data_002.dat

Biopython doesn't seem to have much in the way of the higher level
system/regression-style tests, due to the nature of that project being a
mostly a collection of small modules, as far as I can tell they don't
require testing of higher level 'protocols' which such as relax uses.

As far as running the test suite (ie parsing directories for test_Fred.py
files and running them) .. here's a link to the Biopython code that does
just that (clean-room warning: link is to BSD-ish licensed code :) ):


http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Tests/run_tests.py?rev=1.7&cvsroot=biopython&content-type=ext/vnd.viewcvs-markup


It even uses the unittestgui with the all-important 'green line', that goes
red if any test fails :)


So, if I understand correctly, the plan is to have the test_suite with
something like:

test_suite/unit_tests (for the real module-wise unit tests, using Pythons
unittest module)


and

test_suite/system_tests   (which is closer to what is in the current
test_suite, and could be at the same high level as  the users scripts in
sample_scripts. Eventually the existing tests can be modified to use the
unittest framework for verifying 'correctness' of operation).


That's a great summary of the thread.  As the 1.2 line is now in
maintenance mode, these modifications should go into the 1.3 line.  I
have therefore created the branch of the 1.3 line located at
'branches/test_suite' within the repository
(http://svn.gna.org/viewcvs/relax/) for the changes.

The unittest GUI would probably be quite useful.  The green bar
feature is pretty cool.  However it would be best to wait until the
function/system tests use enough of the unittest framework so that the
entire test suite can run through this TK GUI.  You could then run
'relax --test-suite' and have the GUI pop up.

Two comments

1. we need to be able to run the unittests woithou the gui sometimes ;-)
(I tend to view qa lot of gui stuff for calculations as 'sugar' command
lines are often quicker easier and more informative)
2. I think the unit_test folder will need to be a mirror of the relax
source tree otherwise there will be name space clashes...

regards
gary


Cheers,

Edward

_______________________________________________
relax (http://nmr-relax.com)

This is the relax-devel mailing list
relax-devel@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel

.



--
-------------------------------------------------------------------
Dr Gary Thompson
Astbury Centre for Structural Molecular Biology,
University of Leeds, Astbury Building,
Leeds, LS2 9JT, West-Yorkshire, UK             Tel. +44-113-3433024
email: garyt@xxxxxxxxxxxxxxx                   Fax  +44-113-2331407
-------------------------------------------------------------------






Related Messages


Powered by MHonArc, Updated Tue Oct 31 16:21:32 2006