Skip to content
Back to top
View this page

# Fuzzer

class dsviper.Fuzzer(definitions)

  Bases: `object`

  A class used to generate a random value.

  blob_id() → ValueBlobId | None

    Return The special uniq blob_id or None.

  blob_size() → int

    Return the size of the generated blob.

  fuzz(type: Type) → Value

    Generate and return a random value from the type.

  map_size() → int

    Set the size of the generated map.

  set_blob_id(blob_id: ValueBlobId | None = None) → None

    Set The special uniq blob_id if specified.

  set_blob_size(value: int) → None

    Set the size of the generated blob.

  set_map_size(value: int) → None

    Set the size of the generated map.

  set_set_size(value: int) → None

    Set the size of the generated set.

  set_size() → int

    Return the size of the generated set.

  set_string_size(value: int) → None

    Set the size of the generated string.

  set_vector_size(value: int) → None

    Set the size of the generated vector.

  set_xarray_size(value: int) → None

    Set the size of the generated xarray.

  string_size() → int

    Return the size of the generated string.

  types() → list[Type]

    Return the list of types.

  vector_size() → int

    Return the size of the generated vector.

  xarray_size() → int

    Return the size of the generated xarray.