Author: bugman Date: Sat Jan 5 19:16:20 2008 New Revision: 4359 URL: http://svn.gna.org/viewcvs/relax?rev=4359&view=rev Log: Converted the Bond length value setting test to the new system test framework. Modified: 1.3/test_suite/system_tests/model_free.py Modified: 1.3/test_suite/system_tests/model_free.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/model_free.py?rev=4359&r1=4358&r2=4359&view=diff ============================================================================== --- 1.3/test_suite/system_tests/model_free.py (original) +++ 1.3/test_suite/system_tests/model_free.py Sat Jan 5 19:16:20 2008 @@ -48,13 +48,6 @@ def old_code(self): - # Test of setting the CSA. - if test_name == 'set csa': - # The name of the test. - - # The test. - self.test = self.set_csa - # Test of setting the bond length. if test_name == 'set bond length': # The name of the test. @@ -1164,11 +1157,8 @@ return 1 - def set_bond_length(self, pipe): - """Testing the setting of the bond length.""" - - # Create the data pipe. - self.relax.interpreter._Pipe.create(pipe, 'mf') + def test_set_bond_length(self): + """Setting the bond length through the user function value.set().""" # Path of the files. path = sys.path[-1] + '/test_suite/system_tests/data/model_free/S2_0.970_te_2048_Rex_0.149' @@ -1179,12 +1169,11 @@ # Set the CSA value. self.relax.interpreter._Value.set(NH_BOND_LENGTH, 'bond_length') + # Alias the current data pipe. + cdp = relax_data_store[relax_data_store.current_pipe] + # Test the value. - if relax_data_store[pipe].mol[0].res[1].spin[0].r != NH_BOND_LENGTH: - print "The bond length has not been set correctly." - return - - return 1 + self.assertEqual(cdp.mol[0].res[1].spin[0].r, NH_BOND_LENGTH) def test_set_csa(self):