New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow new Random instances to be constructed with specified seed. #1033

Closed
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
2 participants
@awwx
Contributor

awwx commented May 11, 2013

For repeatable unit test failures with "random" data it's useful to be
able to create deterministic random number sequences.

Introduce Random.create(seed...) which returns a object with the
Random API (id(), choice(), etc.) initialized with the passed
seed(s).

Allow new Random instances to be constructed with specified seed.
For repeatable unit test failures with "random" data it's useful to be
able to create deterministic random number sequences.

Introduce `Random.create(seed...)` which returns a object with the
`Random` API (`id()`, `choice()`, etc.) initialized with the passed
seed(s).
@n1mmy

This comment has been minimized.

Member

n1mmy commented May 23, 2013

Looks good! Merged. Thanks, @awwx.

@n1mmy n1mmy closed this May 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment