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
libregrtest
should always set random.seed
#110171
Comments
…-use-randseed` is provided
…-use-randseed` is provided
I think that the seed should be random but recorded so that a run can be reproduced. |
Yes 👍 |
I had a similar idea. I would prefer that
As an user, it's hard to understand this option. I don't understand the use case neither. Is it to increase the entropy of the initial seed? Recently, I increased the rand seed range to make it 10x larger :-) I suggest to not add such confusing option. Just always set a random seed and display it. |
I've checked all other |
Thanks for checking. |
Feature or enhancement
While working on #110160 I've noticed that it is rather hard to reproduce random test failures. So, I want to propose a new feature / fix for that.
First of all, there's existing prior work of @vstinner who added
--randseed
flag.Right now it is used together with
-r
to randomize test order and seeding random.I propose to:
--randseed
into two options: test order randomization andrandom.seed
usage-r
as-is--no-use-randseed
flag to disable settingrandom.seed
, let's always seed random by defaultExample:
Basically, this is how https://github.com/pytest-dev/pytest-randomly works.
I have a PR ready.
Linked PRs
libregrtest
always setsrandom.seed
unless--no-use-randseed
is provided #110172The text was updated successfully, but these errors were encountered: