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

Stateful testing doesn't explicitly seed global random #702

Closed
DRMacIver opened this issue Jun 22, 2017 · 2 comments · Fixed by #1295
Closed

Stateful testing doesn't explicitly seed global random #702

DRMacIver opened this issue Jun 22, 2017 · 2 comments · Fixed by #1295
Assignees
Labels
enhancement it's not broken, but we want it to be better

Comments

@DRMacIver
Copy link
Member

@given seeds the global random number generator to zero to minimize flakiness. Stateful testing should do this too but currently doesn't.

@DRMacIver DRMacIver added the enhancement it's not broken, but we want it to be better label Jun 22, 2017
@flyingmutant
Copy link
Contributor

As I can see here @given uses get_random_for_wrapped_test. Can you please clarify what this issue is about?

@Zac-HD
Copy link
Member

Zac-HD commented Mar 3, 2018

The idea is to similarly seed the random generator in hypothesis.stateful, probably in find_breaking_runner, to ensure that failing tests are reproducible even for code that uses the random module internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement it's not broken, but we want it to be better
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants