Author: bugman
Date: Tue Nov 11 13:39:57 2014
New Revision: 26517
URL: http://svn.gna.org/viewcvs/relax?rev=26517&view=rev
Log:
The target_function.relax_fit module unit tests are now skipped if the C module
is not compiled.
Modified:
trunk/test_suite/unit_tests/_target_functions/test_relax_fit.py
Modified: trunk/test_suite/unit_tests/_target_functions/test_relax_fit.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_target_functions/test_relax_fit.py?rev=26517&r1=26516&r2=26517&view=diff
==============================================================================
--- trunk/test_suite/unit_tests/_target_functions/test_relax_fit.py
(original)
+++ trunk/test_suite/unit_tests/_target_functions/test_relax_fit.py Tue Nov
11 13:39:57 2014
@@ -24,11 +24,30 @@
from unittest import TestCase
# relax module imports.
-from target_functions.relax_fit import setup, func, dfunc, d2func, jacobian,
jacobian_chi2
+from dep_check import C_module_exp_fn
+from status import Status; status = Status()
+if C_module_exp_fn:
+ from target_functions.relax_fit import setup, func, dfunc, d2func,
jacobian, jacobian_chi2
class Test_relax_fit(TestCase):
"""Unit tests for the target_functions.relax_fit relax C module."""
+
+ def __init__(self, methodName='runTest'):
+ """Skip the tests if the C modules are non-functional.
+
+ @keyword methodName: The name of the test.
+ @type methodName: str
+ """
+
+ # Execute the base class method.
+ super(Test_relax_fit, self).__init__(methodName)
+
+ # Missing module.
+ if not C_module_exp_fn:
+ # Store in the status object.
+ status.skipped_tests.append([methodName, 'Relax curve-fitting C
module', 'unit'])
+
def setUp(self):
"""Create a number of objects for the calculation and testing of the
relaxation curve-fitting equations."""
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits 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-commits