Author: bugman Date: Tue Nov 20 10:13:10 2007 New Revision: 3614 URL: http://svn.gna.org/viewcvs/relax?rev=3614&view=rev Log: Added a unit test for the proper failure of the spin.create() user function for the spin_num arg. 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=3614&r1=3613&r2=3614&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/prompt/test_spin.py (original) +++ 1.3/test_suite/unit_tests/prompt/test_spin.py Tue Nov 20 10:13:10 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, RelaxStrError +from relax_errors import RelaxError, RelaxIntError, RelaxNoPipeError, RelaxNoneStrError, RelaxStrError from test_suite.unit_tests.spin_testing_base import Spin_base_class @@ -51,7 +51,6 @@ def test_copy_argfail_pipe_from(self): """Test the proper failure of the spin.copy() user function for the pipe_from argument.""" - # Loop over the data types. for data in return_data_types(): # Catch the None and str arguments, and skip them. @@ -64,7 +63,6 @@ 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(): @@ -79,7 +77,6 @@ def test_copy_argfail_pipe_to(self): """Test the proper failure of the spin.copy() user function for the pipe_to argument.""" - # Loop over the data types. for data in return_data_types(): # Catch the None and str arguments, and skip them. @@ -93,7 +90,6 @@ def test_copy_argfail_spin_to(self): """Test the proper failure of the spin.copy() user function for the spin_to argument.""" - # Loop over the data types. for data in return_data_types(): # Catch the None and str arguments, and skip them. @@ -104,4 +100,17 @@ self.assertRaises(RelaxNoneStrError, self.spin_fns.copy, spin_from='#Old mol:1@111', spin_to=data[1]) + def test_create_argfail_spin_num(self): + """Test the proper failure of the spin.create() user function for the spin_num argument.""" + # Loop over the data types. + for data in return_data_types(): + # Catch the int arguments, and skip them. + if data[0] == 'int': + continue + + # The argument test. + self.assertRaises(RelaxIntError, self.spin_fns.create, spin_num=data[1], spin_name='NH') + + +