Skip to content

Generators Returning Same Value #7

@markbastian

Description

@markbastian

Some generators always produce the same value when sampled.

 (require '[clojure.spec.gen.alpha :as gen])
  (require '[talltale.core :as tc])

  ;Returns a bunch of names
  (gen/sample (tc/first-name-gen))
  ;Returns the same value. Each evaluation produces a new value, but that value is repeated for all samples.
  (gen/sample (tc/date-of-birth-gen (tc/age)))
  ;Same behavior here
  (gen/sample (tc/email-gen :en (tc/first-name) (tc/last-name)))

I would expect all samples to be different.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions