testing/clusterfuzz/common/fuzzy_types.py
def RandomMutation(self, count=None, new_element=""):
    """Apply count random mutations chosen from a list."""
    random_items = lambda: random.choice(self) if self else new_element
    mutations = [
      lambda: random.shuffle(self),
      self.reverse,
      functools.partial(self.Overwrite, new_element),
      functools.partial(self.Overwrite, random_items),
      functools.partial(self.Insert, new_element, max_exponent=10),
      functools.partial(self.Insert, random_items, max_exponent=10),
      self.Delete,
    ]
    if count is None:
      count = utils.RandomLowInteger(1, 5, beta=3.0)
    for _ in range(count):
      random.choice(mutations)()
Apply count random mutations chosen from a list.
Apply count random mutations chosen from a list.
Apply count random mutations chosen from a list .
def RandomMutation(self, count=None, new_element=""):
    random_items = lambda: random.choice(self) if self else new_element
    mutations = [
      lambda: random.shuffle(self),
      self.reverse,
      functools.partial(self.Overwrite, new_element),
      functools.partial(self.Overwrite, random_items),
      functools.partial(self.Insert, new_element, max_exponent=10),
      functools.partial(self.Insert, random_items, max_exponent=10),
      self.Delete,
    ]
    if count is None:
      count = utils.RandomLowInteger(1, 5, beta=3.0)
    for _ in range(count):
      random.choice(mutations)()
def RandomMutation ( self , count = None , new_element = "" ) : random_items = lambda : random . choice ( self ) if self else new_element mutations = [ lambda : random . shuffle ( self ) , self . reverse , functools . partial ( self . Overwrite , new_element ) , functools . partial ( self . Overwrite , random_items ) , functools . partial ( self . Insert , new_element , max_exponent = 10 ) , functools . partial ( self . Insert , random_items , max_exponent = 10 ) , self . Delete , ] if count is None : count = utils . RandomLowInteger ( 1 , 5 , beta = 3.0 ) for _ in range ( count ) : random . choice ( mutations ) ( )
Apply count random mutations chosen from a list.
Apply count random mutations chosen from a list .
"""Apply count random mutations chosen from a list."""
self
count
new_element