Author: bugman Date: Tue Oct 9 11:53:02 2012 New Revision: 17782 URL: http://svn.gna.org/viewcvs/relax?rev=17782&view=rev Log: All system and GUI tests reliant on the relax-fit C modules are deactivated if import fails. This removes a pile of useless error messages from the test, and presents a table of skipped tests at the end. Modified: trunk/test_suite/gui_tests/rx.py trunk/test_suite/system_tests/peak_lists.py trunk/test_suite/system_tests/relax_fit.py trunk/test_suite/system_tests/state.py Modified: trunk/test_suite/gui_tests/rx.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/gui_tests/rx.py?rev=17782&r1=17781&r2=17782&view=diff ============================================================================== --- trunk/test_suite/gui_tests/rx.py (original) +++ trunk/test_suite/gui_tests/rx.py Tue Oct 9 11:53:02 2012 @@ -25,6 +25,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_loop from generic_fns.pipes import cdp_name from status import Status; status = Status() @@ -38,6 +39,22 @@ class Rx(GuiTestCase): """Class for testing various aspects specific to the R1 and R2 analyses.""" + + 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(Rx, self).__init__(methodName) + + # Missing module. + if not dep_check.C_module_exp_fn: + # Store in the status object. + status.skipped_tests.append([methodName, 'Relax curve-fitting C module', self._skip_type]) + def check_curve_fitting(self): """Check the results of the curve-fitting.""" Modified: trunk/test_suite/system_tests/peak_lists.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=17782&r1=17781&r2=17782&view=diff ============================================================================== --- trunk/test_suite/system_tests/peak_lists.py (original) +++ trunk/test_suite/system_tests/peak_lists.py Tue Oct 9 11:53:02 2012 @@ -25,6 +25,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_loop from status import Status; status = Status() from test_suite.system_tests.base_classes import SystemTestCase @@ -32,6 +33,22 @@ class Peak_lists(SystemTestCase): """TestCase class for the functional tests for the support of different peak intensity files.""" + + 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(Peak_lists, self).__init__(methodName) + + # Missing module. + if not dep_check.C_module_exp_fn and methodName in ['test_bug_17276_peak_lists', 'test_ccpn_analysis']: + # Store in the status object. + status.skipped_tests.append([methodName, 'Relax curve-fitting C module', self._skip_type]) + def setUp(self): """Set up for all the functional tests.""" 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=17782&r1=17781&r2=17782&view=diff ============================================================================== --- trunk/test_suite/system_tests/relax_fit.py (original) +++ trunk/test_suite/system_tests/relax_fit.py Tue Oct 9 11:53:02 2012 @@ -50,7 +50,7 @@ # 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]) + status.skipped_tests.append([methodName, 'Relax curve-fitting C module', self._skip_type]) def setUp(self): Modified: trunk/test_suite/system_tests/state.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/state.py?rev=17782&r1=17781&r2=17782&view=diff ============================================================================== --- trunk/test_suite/system_tests/state.py (original) +++ trunk/test_suite/system_tests/state.py Tue Oct 9 11:53:02 2012 @@ -26,13 +26,31 @@ # relax module imports. from data import Relax_data_store; ds = Relax_data_store() +import dep_check from generic_fns.pipes import VALID_TYPES, get_pipe from generic_fns.reset import reset +from status import Status; status = Status() from test_suite.system_tests.base_classes import SystemTestCase class State(SystemTestCase): """Class for testing the state saving and loading user functions.""" + + 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(State, self).__init__(methodName) + + # Missing module. + if not dep_check.C_module_exp_fn and methodName in ['test_write_read_pipes']: + # Store in the status object. + status.skipped_tests.append([methodName, 'Relax curve-fitting C module', self._skip_type]) + def setUp(self): """Common set up for these system tests.""" @@ -64,7 +82,7 @@ """Test the writing out, and re-reading of data pipes from the state file.""" # Create a data pipe. - self.interpreter.pipe.create('test', 'relax_fit') + self.interpreter.pipe.create('test', 'mf') # Reset relax. reset()