mailr17731 - /trunk/test_suite/system_tests/relax_fit.py


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

Header


Content

Posted by edward on October 07, 2012 - 22:11:
Author: bugman
Date: Sun Oct  7 22:11:43 2012
New Revision: 17731

URL: http://svn.gna.org/viewcvs/relax?rev=17731&view=rev
Log:
The relaxation curve-fitting system tests are now skipped if the module is 
missing or broken.

This improves the printouts from the test suite and shows a summary of 
skipped tests rather than a
pile of traceback messages and errors.


Modified:
    trunk/test_suite/system_tests/relax_fit.py

Modified: trunk/test_suite/system_tests/relax_fit.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_fit.py?rev=17731&r1=17730&r2=17731&view=diff
==============================================================================
--- trunk/test_suite/system_tests/relax_fit.py (original)
+++ trunk/test_suite/system_tests/relax_fit.py Sun Oct  7 22:11:43 2012
@@ -26,6 +26,7 @@
 
 # relax module imports.
 from data import Relax_data_store; ds = Relax_data_store()
+import dep_check
 from generic_fns.mol_res_spin import spin_index_loop, spin_loop
 from generic_fns import pipes
 from relax_errors import RelaxError
@@ -35,6 +36,22 @@
 
 class Relax_fit(SystemTestCase):
     """Class for testing various aspects specific to relaxation 
curve-fitting."""
+
+    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(Relax_fit, self).__init__(methodName)
+
+        # Missing module.
+        if not dep_check.C_module_exp_fn:
+            # Store in the status object. 
+            status.skipped_tests.append([methodName, 'Relaxation 
curve-fitting C module', self._skip_type])
+
 
     def setUp(self):
         """Set up for all the functional tests."""




Related Messages


Powered by MHonArc, Updated Mon Oct 08 00:20:02 2012