# HG changeset patch # User Arnaud Bergeron # Date 1265819010 18000 # Node ID 22823acc17120338019cd2f6b6d328cbd4fda1fb # Parent be24db3a4d6ec6746be258f733e5ed93f0931a20 Fix testmod to accept modules with no params. diff -r be24db3a4d6e -r 22823acc1712 transformations/testmod.py --- a/transformations/testmod.py Wed Feb 10 00:38:54 2010 -0500 +++ b/transformations/testmod.py Wed Feb 10 11:23:30 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 and params == params2: error("the complexity parameter determines the distribution of the parameters, not their value") mod.regenerate_parameters(0.0)