Author: bugman Date: Sun Nov 18 23:54:55 2007 New Revision: 3604 URL: http://svn.gna.org/viewcvs/relax?rev=3604&view=rev Log: Wrote a unit test for the proper failure of the spin.copy() user function spin_from argument. Modified: 1.3/test_suite/unit_tests/prompt/test_spin.py Modified: 1.3/test_suite/unit_tests/prompt/test_spin.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/prompt/test_spin.py?rev=3604&r1=3603&r2=3604&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/prompt/test_spin.py (original) +++ 1.3/test_suite/unit_tests/prompt/test_spin.py Sun Nov 18 23:54:55 2007 @@ -27,7 +27,7 @@ from data import Data as relax_data_store from data_types import return_data_types from prompt.spin import Spin -from relax_errors import RelaxError, RelaxNoPipeError, RelaxNoneStrError +from relax_errors import RelaxError, RelaxNoPipeError, RelaxNoneStrError, RelaxStrError from test_suite.unit_tests.spin_testing_base import Spin_base_class @@ -58,5 +58,19 @@ if data[0] == 'None' or data[0] == 'str': continue - # Copy a spin to a number which already exists. + # The argument test. self.assertRaises(RelaxNoneStrError, self.spin_fns.copy, pipe_from=data[1], spin_from='#Old mol:1@111', spin_to='#Old mol:2') + + + def test_copy_argfail_spin_from(self): + """Test the proper failure of the spin.copy() user function for the spin_from argument.""" + + + # Loop over the data types. + for data in return_data_types(): + # Catch the str argument, and skip it. + if data[0] == 'str': + continue + + # The argument test. + self.assertRaises(RelaxStrError, self.spin_fns.copy, spin_from=data[1], spin_to='#Old mol:2')