3 | | We introduce an option for doctests: `--random-seed`, |

4 | | that defaults to `0` for now: |

| 3 | We introduce an option for doctests: `--random-seed`. |

| 4 | |

| 5 | This allows specifying which seed to use for tests |

| 6 | involving randomness. |

| 7 | |

| 8 | The seed is displayed in the test log: |

| 9 | |

| 10 | {{{ |

| 11 | sage -t --long --random-seed=9876543210 src/sage/all.py |

| 12 | ... |

| 13 | Doctesting 1 file. |

| 14 | sage -t --long --random-seed=9876543210 src/sage/all.py |

| 15 | [16 tests, 0.73 s] |

| 16 | ---------------------------------------------------------------------- |

| 17 | All tests passed! |

| 18 | ---------------------------------------------------------------------- |

| 19 | Total time for all tests: 0.8 seconds |

| 20 | cpu time: 0.7 seconds |

| 21 | cumulative wall time: 0.7 seconds |

| 22 | }}} |

| 23 | |

| 24 | which makes it easy to re-run tests with the same seed. |

| 25 | |

| 26 | The seed defaults to `0` for now: |