Skip to content
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

Consistent seeding #14

Open
ybressler opened this issue Nov 8, 2022 · 0 comments
Open

Consistent seeding #14

ybressler opened this issue Nov 8, 2022 · 0 comments

Comments

@ybressler
Copy link

ybressler commented Nov 8, 2022

I want to be able to generate consistent silly mocks.

It appears the solution is to use:silly.mock_random.seed() However, when I do, I do not get consistent results: ❌

import silly

silly.mock_random.seed(123)
print(silly.name())

When I rerun this code, I do not get the same result.


However, when I seed using random I do get consistent results: ✅

import random
import silly

random.seed(123)
print(silly.name())

I guess this ticket regards updating the documentation to properly seed this stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant