Author: bugman Date: Sun Nov 11 12:21:26 2007 New Revision: 3469 URL: http://svn.gna.org/viewcvs/relax?rev=3469&view=rev Log: Added a unit test for the failure of copying spin data to a non-existent data pipe. Modified: 1.3/test_suite/unit_tests/generic_fns/test_spin.py Modified: 1.3/test_suite/unit_tests/generic_fns/test_spin.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/generic_fns/test_spin.py?rev=3469&r1=3468&r2=3469&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/generic_fns/test_spin.py (original) +++ 1.3/test_suite/unit_tests/generic_fns/test_spin.py Sun Nov 11 12:21:26 2007 @@ -26,6 +26,7 @@ # relax module imports. from data import Data as relax_data_store from generic_fns import residue, spin +from relax_errors import RelaxNoPipeError @@ -163,3 +164,19 @@ # Test the new spin. self.assertEqual(relax_data_store['test'].mol[0].res[0].spin[0].num, 111) self.assertEqual(relax_data_store['test'].mol[0].res[0].spin[0].x, 1) + + + def test_copy_between_pipes_fail_no_pipe(self): + """Test the copying of the spin data between different data pipes. + + The function used is generic_fns.spin.copy(). + """ + + # Set up the data. + self.setup_data() + + # Copy the spin to the second data pipe. + self.assertRaises(RelaxNoPipeError, spin.copy, spin_from='#Old mol:1@111', pipe_to='test2') + + +