Author: bugman Date: Thu Nov 22 00:59:21 2007 New Revision: 3785 URL: http://svn.gna.org/viewcvs/relax?rev=3785&view=rev Log: Implemented the mol_name_col arg unit test for the sequence.read() user function. Modified: 1.3/test_suite/unit_tests/_prompt/test_sequence.py Modified: 1.3/test_suite/unit_tests/_prompt/test_sequence.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/test_sequence.py?rev=3785&r1=3784&r2=3785&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/_prompt/test_sequence.py (original) +++ 1.3/test_suite/unit_tests/_prompt/test_sequence.py Thu Nov 22 00:59:21 2007 @@ -28,7 +28,7 @@ from data import Data as relax_data_store from data_types import return_data_types from prompt.sequence import Sequence -from relax_errors import RelaxNoneStrError, RelaxStrError +from relax_errors import RelaxNoneIntError, RelaxNoneStrError, RelaxStrError from test_suite.unit_tests.sequence_testing_base import Sequence_base_class # Set the variable sys.ps3 (this is required by the user functions). @@ -76,3 +76,16 @@ # The argument test. self.assertRaises(RelaxNoneStrError, self.sequence_fns.read, file='a', dir=data[1]) + + + def test_read_argfail_mol_name_col(self): + """The proper failure of the sequence.read() user function for the mol_name_col argument.""" + + # Loop over the data types. + for data in return_data_types(): + # Catch the None, int, and bin arguments, and skip them. + if data[0] == 'None' or data[0] == 'int' or data[0] == 'bin': + continue + + # The argument test. + self.assertRaises(RelaxNoneIntError, self.sequence_fns.read, file='a', mol_name_col=data[1])