Author: bugman Date: Sun Nov 11 13:29:30 2007 New Revision: 3484 URL: http://svn.gna.org/viewcvs/relax?rev=3484&view=rev Log: Split the generic_fns.spin.copy() unit test 'test_copy_fail' into four unit tests. 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=3484&r1=3483&r2=3484&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 13:29:30 2007 @@ -184,8 +184,8 @@ - def test_copy_fail(self): - """Test the failure of the copying of the spin data. + def test_copy_fail1(self): + """Test the failure of the copying of the spin data of a non-existent residue. The function used is generic_fns.spin.copy(). """ @@ -196,14 +196,42 @@ # Copy a non-existent residue (1 Met, @111). self.assertRaises(RelaxError, spin.copy, spin_from=':Met@111', spin_to=':2,Gly') + + def test_copy_fail2(self): + """Test the failure of the copying of the spin data of a non-existent spin. + + The function used is generic_fns.spin.copy(). + """ + + # Set up the data. + self.setup_data() + # Copy a non-existent spin (1 Ala, @234). self.assertRaises(RelaxError, spin.copy, spin_from=':Ala@234', spin_to=':2,Gly') + + def test_copy_fail3(self): + """Test the failure of the copying of the spin data to a non-existent residue. + + The function used is generic_fns.spin.copy(). + """ + + # Set up the data. + self.setup_data() + # Copy to a non-existent residue (3). self.assertRaises(RelaxError, spin.copy, spin_from='#Old mol:1@111', spin_to='#Old mol:3') + + def test_copy_fail4(self): + """Test the failure of the copying of the spin data to a number which already exists. + + The function used is generic_fns.spin.copy(). + """ + + # Set up the data. + self.setup_data() + # Copy a spin to a number which already exists. self.assertRaises(RelaxError, spin.copy, spin_from=':1', spin_to=':2@78') - -