# HG changeset patch # User Arnaud Bergeron # Date 1265817524 18000 # Node ID 089f236759d94faae71cf75f66a8cb151c8731d5 # Parent be24db3a4d6ec6746be258f733e5ed93f0931a20 Fix testmod so that modules with no parameters are accepted. diff -r be24db3a4d6e -r 089f236759d9 transformations/testmod.py --- a/transformations/testmod.py Wed Feb 10 00:38:54 2010 -0500 +++ b/transformations/testmod.py Wed Feb 10 10:58:44 2010 -0500 @@ -56,9 +56,6 @@ if type(names) is not list: error("Must return a list") -if len(names) == 0: - error("Must return at least one element") - if not all(type(e) is str for e in names): warn("The elements of the list should be strings") @@ -77,7 +74,7 @@ error("the returned parameter list must have the same length as the number of parameters") params2 = mod.regenerate_parameters(0.2) -if params == params2: +if len(names) != 0 && params == params2: error("the complexity parameter determines the distribution of the parameters, not their value") mod.regenerate_parameters(0.0)