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

Wire together `random` from FactoryBoy hooks to Faker's random seed #275

Closed
jeffwidman opened this Issue Feb 29, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@jeffwidman
Member

jeffwidman commented Feb 29, 2016

@punchagan

This comment has been minimized.

Show comment
Hide comment
@punchagan

punchagan Nov 17, 2016

Initializing FactoryBoy with a random seed (using reseed_random, for instance) should also set the seed for Faker. I currently work around this, by setting the seed for Faker myself.

punchagan commented Nov 17, 2016

Initializing FactoryBoy with a random seed (using reseed_random, for instance) should also set the seed for Faker. I currently work around this, by setting the seed for Faker myself.

@rbarrois

This comment has been minimized.

Show comment
Hide comment
@rbarrois

rbarrois Nov 18, 2016

Member

Yes, that's the goal here.

Last time I checked, the hooks in Faker didn't allow to handle the random seed finely enough.

The API in factory_boy allow to:

  • Display the used "random state" after the test run
  • Reuse a previous seed afterwards

If the APIs in faker have improved, it would be easy to adjust the hooks in factory.fuzzy accordingly.

Member

rbarrois commented Nov 18, 2016

Yes, that's the goal here.

Last time I checked, the hooks in Faker didn't allow to handle the random seed finely enough.

The API in factory_boy allow to:

  • Display the used "random state" after the test run
  • Reuse a previous seed afterwards

If the APIs in faker have improved, it would be easy to adjust the hooks in factory.fuzzy accordingly.

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