-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Use deterministic helper to execute the test provided in the block successive number of times #2813
Comments
Hello, Would this issue to be something like this?
If so, I think I can take this one. In the case we have 1000.times loop, like Lovecraft.word generator, should we use |
I want to do this myself! |
@stefannibrasil |
Hi @fernandomenolli yes, you can follow the existing tests implementation for the new ones. About the depth, I don't think we need a high number. 4 or 5 looks good. Thank you! |
Hi @ak2-lucky thank you for your contribution! @fernandomenolli already has shared an interest in taking this one, I just didn't have the time to assign the issue to them earlier this week. I hope you understand. Thanks! |
Thanks @stefannibrasil, gonna work on it. |
Oh, Sorry @fernandomenolli and @stefannibrasil @stefannibrasil |
@stefannibrasil I just opened a PR to this issue. Feel free to let me know if anything needs to be improved. |
no worries, @ak2-lucky thanks for understanding. I don't have details yet as this current issue but one thing we always need help with is checking the locales files, and seeing if they are working as expected. I guess trying some generators with a specific locale (portuguese, italian, etc.) and seeing if they break with the locales, would be helpful. |
faker has a
deterministic_verify
test helper that we can use for verifying the randomness of generators multiple times.We have some tests using
10.times
,100.times
,1000.times
blocks that we want to replace with the test helper mentioned above. Here are some examples of places that can be improved using the deterministic helper:And other examples of tests using the helper:
https://github.com/faker-ruby/faker/blob/main/test/faker/default/test_faker_internet.rb#L61
Expected Outcomes
This issue is great for a beginner, so please choose another way to contribute to faker if you have already contributed to other open source projects.
The text was updated successfully, but these errors were encountered: