I would suggest that all the current tests move into the directory
'test_suite/function_tests' (or maybe 'system_tests'). All the unit
tests would go into 'test_suite/unit_tests'. In the base directory
'test_suite', a new file is created to run the unit tests, then run
the function or system test. Would you like to make a branch of the
1.3 line to add these unit tests to relax? If you would like to do
this, don't forget to use the script
http://www.nmr-relax.com/scripts/code_validator and please try to
include many comments (starting with #) explaining why certain
functions are called, etc.
A side note is that you haven't ported your floating point code into
the 1.3 line yet. If you would like me to do this for you, I could
possibly do it tomorrow. If you would like to go, more details are
given in the post at
https://mail.gna.org/public/relax-devel/2006-10/msg00105.html
(Message-id: <[EMAIL PROTECTED]>).
Edward
On 10/31/06, Gary S. Thompson <[EMAIL PROTECTED]> wrote:
Just as a not io have (just) started to write unit tests for the
float.py module:
test_float.py:
#!/usr/bin/python
import unittest
from float import *
FLOAT_EPSILON=float(4.94065645841247e-324) # replace a a later date
class testfloat(unittest.TestCase):
def testGetFloatClass(self):
tests = ( CLASS_POS_INF, pos_inf,
CLASS_NEG_INF, neg_inf,
CLASS_POS_NORMAL, float(1e6),
CLASS_NEG_NORMAL, -float(1e6),
CLASS_POS_DENORMAL, FLOAT_EPSILON,
CLASS_NEG_DENORMAL, -FLOAT_EPSILON,
CLASS_QUIET_NAN, nan,
# WE DON'T USE SIGNAL NANS CLASS_SIGNAL_NAN,
CLASS_POS_ZERO, float(0),
CLASS_NEG_ZERO, -float(0))
for (fpClass, value) in tests:
self.assertEqual(fpClass, getFloatClass(value))
if __name__ == '__main__':
unittest.main()
It doesn't work yet but is a start. Should I alter the relax test suite
to run it as one of the tests... (I would add a directory seracher...
that would create hierachies of test suites...)
regards gary
--
-------------------------------------------------------------------
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: [EMAIL PROTECTED] Fax +44-113-2331407
-------------------------------------------------------------------
_______________________________________________
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