That's not a bad article. We really do need to add unit tests to relax. The whole test suite needs to be overhauled. I have to say that writing tests in the current framework sucks! The unit tests would also be very useful when the proposed redesign (https://mail.gna.org/public/relax-devel/2006-10/msg00053.html, Message-id: <[EMAIL PROTECTED]>) takes place - the changes will essentially be as close to extreme programming as relax coding has gotten. The unit tests would then allow quick refactorisation and debugging of the code.
One thing we could do is set up the test suite into the three-tiered system - unit tests, functional or system tests, and regression tests - that I discussed in the 3rd paragraph of https://mail.gna.org/public/relax-devel/2006-10/msg00076.html (Message-id: <[EMAIL PROTECTED]>). This could use the standard Python unittest module. The other tests could manually implement an analogous methodology to decrease the amount of stuff printed out. There's absolutely no point printing stuff, apart from a summary, if the test passes. This will probably involve IO redirection (of stdout and stderr) to catch and store the crap from each test. If the integration of unit tests are completed before the redesign, one unit test could be added as each function is updated. At the same time, the docstrings could be updated and slightly modified into the epytext format (http://epydoc.sourceforge.net/epytextintro.html and http://epydoc.sourceforge.net/epytext.html) for the relax API documentation (http://www.nmr-relax.com/api/) generated with epydoc (http://epydoc.sourceforge.net/). The other useful idea from that article is that he makes a distinction between and error and failure! Edward On 10/30/06, Andrew Perry <[EMAIL PROTECTED]> wrote:
Hopefully not too off topic, but this little article really hammered home how useful unit tests could be for relax. http://wwmm.ch.cam.ac.uk/blogs/murrayrust/?p=142 I noticed there has been a bit of discussion, but what is the current state/plans for unit tests in relax ? I think the standard python unittest framework would be a bit cleaner than the style of the current test_suite ... but thats coming from someone who hasn't attempted to write any tests under the existing relax test_suite yet. Despite the initial work involved, a robust set of unittests would probably prevent breakage in unexpected places in the future, and provide extra confidence that the results calculated from relax are very reliable. Andrew _______________________________________________ relax (http://nmr-relax.com) This is the relax-devel mailing list [email protected] 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
_______________________________________________ relax (http://nmr-relax.com) This is the relax-devel mailing list [email protected] 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

