Author: semor Date: Tue Jan 6 19:51:45 2009 New Revision: 8228 URL: http://svn.gna.org/viewcvs/relax?rev=8228&view=rev Log: Started the implementation of the relaxation dispersion code. The first step was to introduce the framework for system tests. Added: branches/relax_disp/test_suite/system_tests/relax_disp.py Modified: branches/relax_disp/test_suite/system_tests/__init__.py Modified: branches/relax_disp/test_suite/system_tests/__init__.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/system_tests/__init__.py?rev=8228&r1=8227&r2=8228&view=diff ============================================================================== --- branches/relax_disp/test_suite/system_tests/__init__.py (original) +++ branches/relax_disp/test_suite/system_tests/__init__.py Tue Jan 6 19:51:45 2009 @@ -46,6 +46,7 @@ from palmer import Palmer from peak_lists import Peak_lists from pipe_create import Pipe_create +from relax_disp import Relax_disp from relax_fit import Relax_fit from results import Results from sequence import Sequence @@ -69,6 +70,7 @@ 'palmer', 'peak_lists' 'pipe_create', + 'relax_disp', 'relax_fit', 'results', 'sequence', @@ -110,6 +112,7 @@ suite_array.append(TestLoader().loadTestsFromTestCase(Palmer)) suite_array.append(TestLoader().loadTestsFromTestCase(Peak_lists)) suite_array.append(TestLoader().loadTestsFromTestCase(Pipe_create)) + suite_array.append(TestLoader().loadTestsFromTestCase(Relax_disp)) suite_array.append(TestLoader().loadTestsFromTestCase(Relax_fit)) suite_array.append(TestLoader().loadTestsFromTestCase(Results)) suite_array.append(TestLoader().loadTestsFromTestCase(Sequence)) Added: branches/relax_disp/test_suite/system_tests/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/system_tests/relax_disp.py?rev=8228&view=auto ============================================================================== --- branches/relax_disp/test_suite/system_tests/relax_disp.py (added) +++ branches/relax_disp/test_suite/system_tests/relax_disp.py Tue Jan 6 19:51:45 2009 @@ -1,0 +1,62 @@ +############################################################################### +# # +# Copyright (C) 2006-2008 Edward d'Auvergne # +# Copyright (C) 2009 Sebastien Morin +# # +# 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 shutil import rmtree +import sys +from tempfile import mkdtemp +from unittest import TestCase + +# relax module imports. +from data import Relax_data_store; ds = Relax_data_store() + + +class Relax_disp(TestCase): + """Class for testing various aspects specific to relaxation dispersion curve-fitting.""" + + def setUp(self): + """Set up for all the functional tests.""" + + # Create the data pipe. + self.relax.interpreter._Pipe.create('relax_disp', 'relax_disp') + + # Create a temporary directory for dumping files. + ds.tmpdir = mkdtemp() + self.tmpdir = ds.tmpdir + + + def tearDown(self): + """Reset the relax data storage object.""" + + # Remove the temporary directory. + rmtree(self.tmpdir) + + # Reset the relax data storage object. + ds.__reset__() + + +# def test_curve_fitting(self): +# """Test the relaxation dispersion curve fitting C modules.""" +# +# # Execute the script. +# self.relax.interpreter.run(script_file=sys.path[-1] + '/test_suite/system_tests/scripts/relax_disp.py')