On Tue, Aug 19, 2014 at 02:00:24AM +0400, Maria Kustova wrote: > diff --git a/tests/image-fuzzer/qcow2/fuzz.py > b/tests/image-fuzzer/qcow2/fuzz.py > index 6e272c6..c652dc9 100644 > --- a/tests/image-fuzzer/qcow2/fuzz.py > +++ b/tests/image-fuzzer/qcow2/fuzz.py > @@ -123,7 +123,7 @@ def string_validator(current, strings): > return validator(current, random.choice, strings) > > > -def selector(current, constraints, validate=int_validator): > +def selector(current, constraints, validate=None): > """Select one value from all defined by constraints. > > Each constraint produces one random value satisfying to it. The function > @@ -131,6 +131,9 @@ def selector(current, constraints, > validate=int_validator): > constraints overlaps). > """ > > + if validate is None: > + validate = int_validator > + > def iter_validate(c): > """Apply validate() only to constraints represented as lists. >
I don't understand the benefit of this change. The default initializer syntax did what was intended, now it has been made more complicated with a None value that gets converted to int_validator later.
pgpNVPpauhild.pgp
Description: PGP signature