Author: bugman Date: Tue Nov 27 15:07:03 2007 New Revision: 4079 URL: http://svn.gna.org/viewcvs/relax?rev=4079&view=rev Log: Wrote a unit test for the reading of relaxation data. Modified: 1.3/test_suite/unit_tests/relax_data_testing_base.py Modified: 1.3/test_suite/unit_tests/relax_data_testing_base.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/relax_data_testing_base.py?rev=4079&r1=4078&r2=4079&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/relax_data_testing_base.py (original) +++ 1.3/test_suite/unit_tests/relax_data_testing_base.py Tue Nov 27 15:07:03 2007 @@ -22,8 +22,9 @@ # relax module imports. from data import Data as relax_data_store +from generic_fns import sequence from relax_errors import RelaxError - +import sys class Relax_data_base_class: @@ -54,3 +55,21 @@ """Reset the relax data storage object.""" relax_data_store.__reset__() + + + def test_read(self): + """Test the reading of relaxation data. + + The functions tested are both specific_fns.relax_data.read() and prompt.relax_data.read(). + """ + + # Get the relative path of relax. + path = sys.path[0] + if path == '.': + path = sys.path[-1] + + # First read the residue sequence out of the Ap4Aase 600 MHz NOE data file. + sequence.read(file='Ap4Aase.Noe.600.bz2', dir=path+'/test_suite/shared_data/relaxation_data') + + # Then read the data out of the same file. + self.relax_data_fns.read(ri_label='NOE', frq_label='600', frq=600e6, file='Ap4Aase.Noe.600.bz2', dir=path+'/test_suite/shared_data/relaxation_data')