Author: bugman Date: Tue Jan 4 14:04:32 2011 New Revision: 12137 URL: http://svn.gna.org/viewcvs/relax?rev=12137&view=rev Log: The structure system tests involving scientific python are now skipped if the module is not installed. Modified: 1.3/test_suite/system_tests/structure.py Modified: 1.3/test_suite/system_tests/structure.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/structure.py?rev=12137&r1=12136&r2=12137&view=diff ============================================================================== --- 1.3/test_suite/system_tests/structure.py (original) +++ 1.3/test_suite/system_tests/structure.py Tue Jan 4 14:04:32 2011 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2008-2010 Edward d'Auvergne # +# Copyright (C) 2008-2011 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -26,12 +26,32 @@ # relax module imports. from base_classes import SystemTestCase from data import Relax_data_store; ds = Relax_data_store() +import dep_check from generic_fns.mol_res_spin import count_spins from status import Status; status = Status() class Structure(SystemTestCase): """Class for testing the structural objects.""" + + def __init__(self, methodName='runTest'): + """Skip scientific Python tests if not installed. + + @keyword methodName: The name of the test. + @type methodName: str + """ + + # Scientific python tests. + scientific_tests = ['test_load_scientific_results', 'test_read_pdb_scientific1', 'test_read_pdb_scientific2', 'test_read_pdb_scientific3', 'test_read_pdb_scientific4', 'test_read_pdb_scientific5', 'test_read_pdb_scientific6', 'test_read_pdb_scientific7', 'test_read_pdb_mol_2_model_scientific', 'test_read_pdb_model_2_mol_scientific', 'test_read_pdb_complex_scientific'] + + # Missing module. + if methodName in scientific_tests and not dep_check.scientific_module: + # Store in the status object. + status.skipped_tests.append([methodName, 'Scientific Python', 'system']) + + # Execute the base class method. + super(Structure, self).__init__(methodName) + def setUp(self): """Set up for all the functional tests."""