Author: bugman Date: Mon Jan 7 13:12:28 2008 New Revision: 4409 URL: http://svn.gna.org/viewcvs/relax?rev=4409&view=rev Log: Simplified the non-keyword argument test of the minimise() user function. Nested looping is not necessary to test all combinations. Modified: 1.3/test_suite/unit_tests/_prompt/test_minimisation.py Modified: 1.3/test_suite/unit_tests/_prompt/test_minimisation.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/test_minimisation.py?rev=4409&r1=4408&r2=4409&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/_prompt/test_minimisation.py (original) +++ 1.3/test_suite/unit_tests/_prompt/test_minimisation.py Mon Jan 7 13:12:28 2008 @@ -139,8 +139,8 @@ self.assertRaises(RelaxNoneError, self.minimisation_fns.minimise) - # 1 argument. - ############# + # 1st argument. + ############### # Loop over the data types. for data in DATA_TYPES: @@ -150,35 +150,5 @@ # The argument test. self.assertRaises(RelaxStrError, self.minimisation_fns.minimise, data[1]) - - - # 2 arguments. - ############## - - # Loop over the data types. - for data1 in DATA_TYPES: - # Loop over the data types. - for data2 in DATA_TYPES: - # Catch the str arguments, and skip them. - if data1[0] == 'str' and data2[0] == 'str': - continue - - # The argument test. - self.assertRaises(RelaxStrError, self.minimisation_fns.minimise, data1[1], data2[1]) - - - # 3 arguments. - ############## - - # Loop over the data types. - for data1 in DATA_TYPES: - # Loop over the data types. - for data2 in DATA_TYPES: - # Loop over the data types. - for data3 in DATA_TYPES: - # Catch the str arguments, and skip them. - if data1[0] == 'str' and data2[0] == 'str' and data3[0] == 'str': - continue - - # The argument test. - self.assertRaises(RelaxStrError, self.minimisation_fns.minimise, data1[1], data2[1], data3[1]) + self.assertRaises(RelaxStrError, self.minimisation_fns.minimise, 'a', data[1]) + self.assertRaises(RelaxStrError, self.minimisation_fns.minimise, 'a', 'b', data[1])