Changes between Version 22 and Version 23 of Ticket #29962


Ignore:
Timestamp:
06/08/21 14:38:58 (8 months ago)
Author:
slelievre
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29962

    • Property Cc slelievre added
    • Property Summary changed from Allow fuzzing of doctests to Introduce random-seed option to allow fuzzing of doctests
  • Ticket #29962 – Description

    v22 v23  
    1 Part of #29935.
     1This is the first step towards #29935.
    22
    3 We introduce an option for doctests: `--random-seed`,
    4 that defaults to `0` for now:
     3We introduce an option for doctests: `--random-seed`.
     4
     5This allows specifying which seed to use for tests
     6involving randomness.
     7
     8The seed is displayed in the test log:
     9
     10{{{
     11sage -t --long --random-seed=9876543210 src/sage/all.py
     12...
     13Doctesting 1 file.
     14sage -t --long --random-seed=9876543210 src/sage/all.py
     15    [16 tests, 0.73 s]
     16----------------------------------------------------------------------
     17All tests passed!
     18----------------------------------------------------------------------
     19Total time for all tests: 0.8 seconds
     20    cpu time: 0.7 seconds
     21    cumulative wall time: 0.7 seconds
     22}}}
     23
     24which makes it easy to re-run tests with the same seed.
     25
     26The seed defaults to `0` for now:
    527
    628{{{
     
    1840}}}
    1941
    20 This allows specifying which random seed to use for the doctests.
     42but the plan in #29935 is to eventually have
     43the random seed itself picked at random by default.