Mercurial > ift6266
changeset 296:089f236759d9
Fix testmod so that modules with no parameters are accepted.
author | Arnaud Bergeron <abergeron@gmail.com> |
---|---|
date | Wed, 10 Feb 2010 10:58:44 -0500 |
parents | be24db3a4d6e |
children | 6f606b359df3 |
files | transformations/testmod.py |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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)