Author: bugman Date: Tue Dec 9 10:45:58 2008 New Revision: 8168 URL: http://svn.gna.org/viewcvs/relax?rev=8168&view=rev Log: Added the system test framework for NOE restraint reading tests. This includes one test for the reading of RNA H-bond restraints from an Xplor formatted input file. Added: branches/ave_noe/test_suite/system_tests/noe_restraints.py Added: branches/ave_noe/test_suite/system_tests/noe_restraints.py URL: http://svn.gna.org/viewcvs/relax/branches/ave_noe/test_suite/system_tests/noe_restraints.py?rev=8168&view=auto ============================================================================== --- branches/ave_noe/test_suite/system_tests/noe_restraints.py (added) +++ branches/ave_noe/test_suite/system_tests/noe_restraints.py Tue Dec 9 10:45:58 2008 @@ -1,0 +1,51 @@ +############################################################################### +# # +# Copyright (C) 2008 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. +import sys +from unittest import TestCase + +# relax module imports. +from data import Relax_data_store; ds = Relax_data_store() + + +class Noe_restraints(TestCase): + """Class for testing various aspects specific to NOE restraints.""" + + def setUp(self): + """Set up for all the functional tests.""" + + # Create the data pipe. + self.relax.interpreter._Pipe.create('test', 'N-state') + + + def tearDown(self): + """Reset the relax data storage object.""" + + ds.__reset__() + + + def test_read_xplor_rna(self): + """Test the reading of RNA H-bond restraints in Xplor format.""" + + # Read the Xplor input file. + self.relax.interpreter._Noe.read_restraints(file=noe_rna_hbond.dat, dir=sys.path[-1] + '/test_suite/shared_data/noe_restraints')