Author: bugman Date: Thu Jan 10 16:47:56 2008 New Revision: 4604 URL: http://svn.gna.org/viewcvs/relax?rev=4604&view=rev Log: Fix for the unit test of the copying of an alignment tensor (pulling the data from another pipe). Modified: branches/N_state_model/test_suite/unit_tests/align_tensor_testing_base.py Modified: branches/N_state_model/test_suite/unit_tests/align_tensor_testing_base.py URL: http://svn.gna.org/viewcvs/relax/branches/N_state_model/test_suite/unit_tests/align_tensor_testing_base.py?rev=4604&r1=4603&r2=4604&view=diff ============================================================================== --- branches/N_state_model/test_suite/unit_tests/align_tensor_testing_base.py (original) +++ branches/N_state_model/test_suite/unit_tests/align_tensor_testing_base.py Thu Jan 10 16:47:56 2008 @@ -73,27 +73,6 @@ # Copy the tensor to the test pipe. self.align_tensor_fns.copy(tensor_from='Pf1', pipe_from='orig', tensor_to='Pf1') - - # Test the alignment tensor. - self.assertEqual(relax_data_store['test'].align_tensor['Pf1'].Sxx, -16.6278) - self.assertEqual(relax_data_store['test'].align_tensor['Pf1'].Syy, 6.13037) - self.assertEqual(relax_data_store['test'].align_tensor['Pf1'].Sxy, 7.65639) - self.assertEqual(relax_data_store['test'].align_tensor['Pf1'].Sxz, -1.89157) - self.assertEqual(relax_data_store['test'].align_tensor['Pf1'].Syz, 19.2561) - - - def test_copy_push(self): - """Test the copying of an alignment tensor (pushing the data from another pipe). - - The functions tested are both generic_fns.align_tensor.copy() and - prompt.align_tensor.copy(). - """ - - # Initialise the tensor. - self.align_tensor_fns.init(tensor='Pf1', params=(-16.6278, 6.13037, 7.65639, -1.89157, 19.2561), scale=1.0, angle_units='rad', param_types=0) - - # Copy the tensor to the test pipe. - self.align_tensor_fns.copy(tensor_from='Pf1', pipe_to='test', tensor_to='Pf1') # Test the alignment tensor. self.assertEqual(relax_data_store['test'].align_tensor[0].Sxx, -16.6278) @@ -108,6 +87,32 @@ self.assertEqual(relax_data_store['test'].align_tensor[1].Syz, 19.2561) + def test_copy_push(self): + """Test the copying of an alignment tensor (pushing the data from another pipe). + + The functions tested are both generic_fns.align_tensor.copy() and + prompt.align_tensor.copy(). + """ + + # Initialise the tensor. + self.align_tensor_fns.init(tensor='Pf1', params=(-16.6278, 6.13037, 7.65639, -1.89157, 19.2561), scale=1.0, angle_units='rad', param_types=0) + + # Copy the tensor to the test pipe. + self.align_tensor_fns.copy(tensor_from='Pf1', pipe_to='test', tensor_to='Pf1') + + # Test the alignment tensor. + self.assertEqual(relax_data_store['test'].align_tensor[0].Sxx, -16.6278) + self.assertEqual(relax_data_store['test'].align_tensor[0].Syy, 6.13037) + self.assertEqual(relax_data_store['test'].align_tensor[0].Sxy, 7.65639) + self.assertEqual(relax_data_store['test'].align_tensor[0].Sxz, -1.89157) + self.assertEqual(relax_data_store['test'].align_tensor[0].Syz, 19.2561) + self.assertEqual(relax_data_store['test'].align_tensor[1].Sxx, -16.6278) + self.assertEqual(relax_data_store['test'].align_tensor[1].Syy, 6.13037) + self.assertEqual(relax_data_store['test'].align_tensor[1].Sxy, 7.65639) + self.assertEqual(relax_data_store['test'].align_tensor[1].Sxz, -1.89157) + self.assertEqual(relax_data_store['test'].align_tensor[1].Syz, 19.2561) + + def test_copy_fail(self): """Test the failure of copying of an alignment tensor (target and source are the same).