-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 pytest-randomly for reproducible random test parameters #5868
Conversation
These instances of seeding do not appear to affect test results.
No need to parametrize for a single set of values, let us set them in the test body instead.
Replaced by pytest-randomly. The seed from pytest-randomly appears to be in effect at the test discovery stage and makes RNG-generated test parameters reproducible.
Avoid using `pytest --quiet` which disables pytest-randomly hook that configures consistent seeding for parallel test jobs. Reverts quantumlib#1825.
These tests are tied to the zero seed of numpy RNG.
@vtomole - can you PTAL at this PR? Let me know if there are any questions. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the ping. Forgot to submit review: LGTM.
What happened to #4788 (comment)? |
I believe I was checking the tests with check/pytest script which was executing In short, |
Automerge cancelled: A status check is failing. |
…ib#5868) - Require pytest-randomly for the testing to ensure RNG-generated test parameters are consistent across parallel test jobs. - Remove check/pytest option --actually-quiet which disables pytest-randomly hook for seeding parallel test jobs. - Remove `CIRQ_TESTING_RANDOM_SEED` as it is not needed anymore. - Remove RNG seeding in the tests where it seems redundant. - Clean up one instance of unnecessary test parametrization. This upholds quantumlib#4787 and replaces quantumlib#4788. Reverts quantumlib#1825 and obsoletes quantumlib#1826.
…ib#5868) - Require pytest-randomly for the testing to ensure RNG-generated test parameters are consistent across parallel test jobs. - Remove check/pytest option --actually-quiet which disables pytest-randomly hook for seeding parallel test jobs. - Remove `CIRQ_TESTING_RANDOM_SEED` as it is not needed anymore. - Remove RNG seeding in the tests where it seems redundant. - Clean up one instance of unnecessary test parametrization. This upholds quantumlib#4787 and replaces quantumlib#4788. Reverts quantumlib#1825 and obsoletes quantumlib#1826.
parameters are consistent across parallel test jobs.
hook for seeding parallel test jobs.
CIRQ_TESTING_RANDOM_SEED
as it is not needed anymore.This upholds #4787 and replaces #4788.
Reverts #1825 and obsoletes #1826.