Author: bugman Date: Fri Aug 21 21:09:53 2009 New Revision: 9372 URL: http://svn.gna.org/viewcvs/relax?rev=9372&view=rev Log: Fixes for the test_set_argfail_val() unit test. Modified: 1.3/test_suite/unit_tests/_prompt/test_value.py Modified: 1.3/test_suite/unit_tests/_prompt/test_value.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/test_value.py?rev=9372&r1=9371&r2=9372&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/_prompt/test_value.py (original) +++ 1.3/test_suite/unit_tests/_prompt/test_value.py Fri Aug 21 21:09:53 2009 @@ -45,23 +45,12 @@ # Loop over the data types. for data in DATA_TYPES: - # Catch the None, float, int, str, or bin arguments, and skip them. - if data[0] == 'None' or data[0] == 'int' or data[0] == 'bin' or data[0] == 'str' or data[0] == 'float': + # Catch the None, float, int, str, bin, float list, int list, str list, or bin list arguments, and skip them. + if data[0] == 'None' or data[0] == 'int' or data[0] == 'bin' or data[0] == 'str' or data[0] == 'float' or data[0] == 'int list' or data[0] == 'bin list' or data[0] == 'str list' or data[0] == 'float list': continue - # Catch all number lists. - if data[0] == 'int list' or data[0] == 'float list' or data[0] == 'number list': - self.assertRaises(RelaxError, self.value_fns.set, val=data[1], param='CSA') - if len(data[1]) != 1: - self.assertRaises(RelaxError, self.value_fns.set, val=data[1], param=['CSA']) - - # Catch all other list arguments. - elif isinstance(data[1], list): - self.assertRaises(RelaxListFloatStrError, self.value_fns.set, val=data[1], param=None) - - # All other arguments. - else: - self.assertRaises(RelaxNoneFloatStrListError, self.value_fns.set, val=data[1], param='CSA') + # The argument test. + self.assertRaises(RelaxNoneNumStrListNumStrError, self.value_fns.set, param=data[1], val=None) def test_set_argfail_param(self): @@ -69,7 +58,7 @@ # Loop over the data types. for data in DATA_TYPES: - # Catch the None and str arguments, and skip them. + # Catch the None, str, and str list arguments, and skip them. if data[0] == 'None' or data[0] == 'str' or data[0] == 'str list': continue