-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Introduce random-seed option to allow fuzzing of doctests #29962
Comments
Branch: public/29962 |
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
This comment has been minimized.
This comment has been minimized.
comment:6
Overall, this looks good to me. The following changes seem to be needed: - sage: subprocess.call(["sage", "-t", "--warn-long", "0", "--random-seed=0", -random_seed.rst"], **kwds) # long time
+ sage: subprocess.call(["sage", "-t", "--warn-long", "0", "--random-seed=0", "random_seed.rst"], **kwds) # long time - - ``--random_seed[=seed]`` -- random seed for fuzzing doctests
+ - ``--random-seed[=seed]`` -- random seed for fuzzing doctests |
Reviewer: Markus Wageringel |
comment:7
The branch adds this to the documentation, which is not true for this ticket:
|
Changed branch from public/29962 to public/29962-reb |
Changed reviewer from Markus Wageringel to Markus Wageringel, Matthias Koeppe |
comment:9
From my side this is a positive review - if patchbot is green |
comment:10
Thanks. This successfully passes ptestlong. |
comment:11
Thank you. |
comment:12
Merge conflict |
Changed branch from public/29962-reb2 to |
Changed commit from |
comment:17
What random seeds are allowed? Any integer? |
comment:18
This is how we will eventually get the random seeds.
At least that's the plan for now. Any random seed that you can feed into (Edit: But I wouldn't be surprised if there are bugs somewhere with some strange random seed. There is no way, you can avoid all of them. But at least you can prepare for rather probable cases.) |
comment:19
The Is that from Also isn't "long" a Python 2 concept, Could we document the admissible range in a follow-up ticket, for non-experts like me? |
comment:20
And thanks for the work on varying random seeds when testing! |
comment:21
I added this issue to #29935. The idea was that once all parts of Sage are ready for it, the default would be to select a "random" random seed. |
This is the first step towards #29935.
We introduce an option for doctests:
--random-seed
.This allows specifying which seed to use for tests
involving randomness.
The seed is displayed in the test log:
which makes it easy to re-run tests with the same seed.
The seed defaults to
0
for now:but the plan in #29935 is to eventually have
the random seed itself picked at random by default.
CC: @slel
Component: doctest framework
Keywords: random
Author: Jonathan Kliem
Branch:
1d99129
Reviewer: Markus Wageringel, Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/29962
The text was updated successfully, but these errors were encountered: