Author: bugman Date: Thu Mar 3 15:19:47 2011 New Revision: 12784 URL: http://svn.gna.org/viewcvs/relax?rev=12784&view=rev Log: Created a very basic system test for the relax_data.back_calc() user function. Added: 1.3/test_suite/system_tests/relax_data.py Modified: 1.3/test_suite/system_tests/__init__.py Modified: 1.3/test_suite/system_tests/__init__.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/__init__.py?rev=12784&r1=12783&r2=12784&view=diff ============================================================================== --- 1.3/test_suite/system_tests/__init__.py (original) +++ 1.3/test_suite/system_tests/__init__.py Thu Mar 3 15:19:47 2011 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2006, 2008-2010 Edward d'Auvergne # +# Copyright (C) 2006-2011 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -52,6 +52,7 @@ from pdc import Pdc from peak_lists import Peak_lists from pipes import Pipes +from relax_data import Relax_data from relax_fit import Relax_fit from results import Results from sequence import Sequence @@ -81,6 +82,7 @@ 'pdc', 'peak_lists' 'pipes', + 'relax_data', 'relax_fit', 'results', 'sequence', @@ -145,6 +147,7 @@ suite_array.append(TestLoader().loadTestsFromTestCase(Pdc)) suite_array.append(TestLoader().loadTestsFromTestCase(Peak_lists)) suite_array.append(TestLoader().loadTestsFromTestCase(Pipes)) + suite_array.append(TestLoader().loadTestsFromTestCase(Relax_data)) suite_array.append(TestLoader().loadTestsFromTestCase(Relax_fit)) suite_array.append(TestLoader().loadTestsFromTestCase(Results)) suite_array.append(TestLoader().loadTestsFromTestCase(Sequence)) Added: 1.3/test_suite/system_tests/relax_data.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/relax_data.py?rev=12784&view=auto ============================================================================== --- 1.3/test_suite/system_tests/relax_data.py (added) +++ 1.3/test_suite/system_tests/relax_data.py Thu Mar 3 15:19:47 2011 @@ -1,0 +1,50 @@ +############################################################################### +# # +# Copyright (C) 2011 Edward d'Auvergne # +# # +# This file is part of the program relax. # +# # +# relax is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# relax is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with relax; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +############################################################################### + +# Python module imports. +from os import sep + +# relax module imports. +from base_classes import SystemTestCase +from data import Relax_data_store; ds = Relax_data_store() +from generic_fns.mol_res_spin import spin_loop +from status import Status; status = Status() + + +class Relax_data(SystemTestCase): + """Class for testing various aspects specific to relaxation data back calculation.""" + + def tearDown(self): + """Reset the relax data storage object.""" + + # Reset the relax data storage object. + ds.__reset__() + + + def test_back_calc(self): + """Test the back calculation of relaxation data from model-free results.""" + + # Load the original state. + self.interpreter.state.load(state='sphere_trunc', dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'model_free'+sep+'bug_14941_local_tm_global_selection') + + # Back calculate the relaxation data. + self.interpreter.relax_data.back_calc()