Author: bugman Date: Fri Nov 30 14:08:06 2012 New Revision: 18060 URL: http://svn.gna.org/viewcvs/relax?rev=18060&view=rev Log: Created the Align_tensor.test_copy system test to catch bug #20338 (https://gna.org/bugs/?20338). Modified: trunk/test_suite/system_tests/align_tensor.py Modified: trunk/test_suite/system_tests/align_tensor.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/align_tensor.py?rev=18060&r1=18059&r2=18060&view=diff ============================================================================== --- trunk/test_suite/system_tests/align_tensor.py (original) +++ trunk/test_suite/system_tests/align_tensor.py Fri Nov 30 14:08:06 2012 @@ -83,6 +83,27 @@ cdp.align_tensors[2].set(param='Axx', value=1) + def test_copy(self): + """Test the copying of alignment tensors (to catch bug #20338, https://gna.org/bugs/?20338).""" + + # First reset. + self.interpreter.reset() + + # Create a data pipe. + self.interpreter.pipe.create('copy test', 'N-state') + + # Initialise one tensor. + self.interpreter.align_tensor.init(tensor='orig', params=self.tensors_full[0], param_types=0) + + # Copy the tensor. + self.interpreter.align_tensor.copy(tensor_from='orig', tensor_to='new') + + # Checks. + self.assertEqual(len(cdp.align_tensors), 2) + self.assertEqual(cdp.align_tensors[0].name, 'orig') + self.assertEqual(cdp.align_tensors[1].name, 'new') + + def test_to_and_from_xml(self): """Test the conversion to and from XML."""