qibocal
qibocal copied to clipboard
Prevent tests from failing randomly
Originally posted by @andrea-pasquale in https://github.com/qiboteam/qibocal/issues/731#issuecomment-1967436824
In general, it is good to fix the seed for tests, because they should be reproducible. If you want more randomness, fix many seeds.
Moreover, for tests that depends on the input, sometimes you may want to apply fuzzing. Hypothesis works quite well, and it is integrated with Pytest (not only).
https://hypothesis.readthedocs.io/en/latest/