Author: bugman Date: Thu Apr 10 12:36:48 2008 New Revision: 5544 URL: http://svn.gna.org/viewcvs/relax?rev=5544&view=rev Log: Fixes for all the sequence.display() user function arg unit tests. 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=5544&r1=5543&r2=5544&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/_prompt/test_sequence.py (original) +++ 1.3/test_suite/unit_tests/_prompt/test_sequence.py Thu Apr 10 12:36:48 2008 @@ -41,71 +41,6 @@ sequence_fns = Sequence(fake_relax.fake_instance()) - def test_display_argfail_mol_name_col(self): - """The proper failure of the sequence.display() user function for the mol_name_col argument.""" - - # Loop over the data types. - for data in 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.display, mol_name_col=data[1]) - - - def test_display_argfail_res_num_col(self): - """The proper failure of the sequence.display() user function for the res_num_col argument.""" - - # Loop over the data types. - for data in 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.display, res_num_col=data[1]) - - - def test_display_argfail_res_name_col(self): - """The proper failure of the sequence.display() user function for the res_name_col argument.""" - - # Loop over the data types. - for data in 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.display, res_name_col=data[1]) - - - def test_display_argfail_spin_num_col(self): - """The proper failure of the sequence.display() user function for the spin_num_col argument.""" - - # Loop over the data types. - for data in 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.display, spin_num_col=data[1]) - - - def test_display_argfail_spin_name_col(self): - """The proper failure of the sequence.display() user function for the spin_name_col argument.""" - - # Loop over the data types. - for data in 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.display, spin_name_col=data[1]) - - def test_display_argfail_sep(self): """The proper failure of the sequence.display() user function for the sep argument.""" @@ -119,6 +54,71 @@ self.assertRaises(RelaxNoneStrError, self.sequence_fns.display, sep=data[1]) + def test_display_argfail_mol_name_flag(self): + """The proper failure of the sequence.display() user function for the mol_name_flag argument.""" + + # Loop over the data types. + for data in 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.display, mol_name_flag=data[1]) + + + def test_display_argfail_res_num_flag(self): + """The proper failure of the sequence.display() user function for the res_num_flag argument.""" + + # Loop over the data types. + for data in 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.display, res_num_flag=data[1]) + + + def test_display_argfail_res_name_flag(self): + """The proper failure of the sequence.display() user function for the res_name_flag argument.""" + + # Loop over the data types. + for data in 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.display, res_name_flag=data[1]) + + + def test_display_argfail_spin_num_flag(self): + """The proper failure of the sequence.display() user function for the spin_num_flag argument.""" + + # Loop over the data types. + for data in 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.display, spin_num_flag=data[1]) + + + def test_display_argfail_spin_name_flag(self): + """The proper failure of the sequence.display() user function for the spin_name_flag argument.""" + + # Loop over the data types. + for data in 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.display, spin_name_flag=data[1]) + + def test_read_argfail_file(self): """Test the proper failure of the sequence.read() user function for the file argument."""