-
Notifications
You must be signed in to change notification settings - Fork 15
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
Set random seed for unit tests #196
Conversation
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.
Great idea!
This is great to have. Can you confirm that this seeds the waveform parameters that are themselves sampled from within fixtures? See |
Good catch, yeah, this only works for randomness happening within the tests, not within the fixtures. Let me make that work. |
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
Was thinking about this separately, but would make sense to have those distribution fixtures just return the distriubtion object that can then be sampled from within the fixture. This would solve the above problem, and also allow us to adjust the number of samples we want to generate based on the specific test |
I was thinking the opposite - that it would be convenient to have |
So in
And in
|
Yeah I think that'll work too, just ensure the If |
@EthanMarx I switched over to using a |
Great. Can you quadruple check that |
Yeah, that all works as expected |
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.
LGTM
Sets a seed for unit testing so that the tests are really just checking whether a PR breaks any existing functionality. A separate project that we should into is the error distribution of all of the probabilistic tests.
This change means that if a future test doesn't work with this seed due to randomness, a new random seed will have to be found for which things pass.