Skip to content

Commit

Permalink
Improve ExUnit seed docs (#10962)
Browse files Browse the repository at this point in the history
Make it more obvious what a seed of 0 does.
  • Loading branch information
axelson authored and josevalim committed May 19, 2021
1 parent f82f2c7 commit 1f3b022
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/ex_unit/lib/ex_unit.ex
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ defmodule ExUnit do
* `:seed` - an integer seed value to randomize the test suite. This seed
is also mixed with the test module and name to create a new unique seed
on every test, which is automatically fed into the `:rand` module. This
provides randomness between tests, but predictable and reproducible results;
provides randomness between tests, but predictable and reproducible
results. A `:seed` of `0` will disable randomization and the tests in each
file will always run in the order that they were defined in;
* `:slowest` - prints timing information for the N slowest tests. Running
ExUnit with slow test reporting automatically runs in `trace` mode. It
Expand Down
3 changes: 2 additions & 1 deletion lib/mix/lib/mix/tasks/test.ex
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ defmodule Mix.Tasks.Test do
* `--raise` - raises if the test suite failed
* `--seed` - seeds the random number generator used to randomize the order of tests;
`--seed 0` disables randomization
`--seed 0` disables randomization so the tests in a single file will always be ran
in the same order they were defined in
* `--slowest` - prints timing information for the N slowest tests.
Automatically sets `--trace` and `--preload-modules`
Expand Down

0 comments on commit 1f3b022

Please sign in to comment.