Author: bugman Date: Thu Nov 29 09:29:37 2007 New Revision: 4136 URL: http://svn.gna.org/viewcvs/relax?rev=4136&view=rev Log: Wrote a unit test for testing the failure of copying alignment tensor data. 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=4136&r1=4135&r2=4136&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 Nov 29 09:29:37 2007 @@ -100,6 +100,20 @@ self.assertEqual(relax_data_store['test'].align_tensor['Pf1'].Ayz, 19.2561) + def test_copy_fail(self): + """Test the failure of copying of an alignment tensor (target and source are the same). + + 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.assertRaises(RelaxError, self.align_tensor_fns.copy, tensor_from='Pf1', tensor_to='Pf1') + + def test_delete(self): """Test the deletion of the alignment tensor data structure.