> Guessing a seed that makes all output sorted is neither feasible nor desirable
--seed 0 does not sort the tests, which means failures should come in the same order as the one defined in your test module. Why is that not enough? *José Valim* www.plataformatec.com.br Skype: jv.ptec Founder and Director of R&D On Wed, Jul 6, 2016 at 8:54 PM, Filip Haglund <[email protected]> wrote: > That's a good default, but what about a flag then? Guessing a seed that > makes all output sorted is neither feasible nor desirable, and if the tests > finish within a few seconds, waiting for the result isn't too bad. The > execution order can still be random and concurrent. > > On Wednesday, July 6, 2016 at 7:18:56 PM UTC+2, José Valim wrote: >> >> The tests run in random order to help you catch bugs as tests should not >> be order dependent. You can set the seed to 0 if you want to keep the >> original order (at the cost of not having the random order). Other than >> that, I wouldn't like to sort output because sorting means we need to >> collect the ouput before printing and this means we would no longer be able >> to print failures as they come. >> >> TL;DR - we choose to have random tests and immediate failure reports, >> hence we can't sort the failure output. >> >> >> >> *José Valim* >> www.plataformatec.com.br >> Skype: jv.ptec >> Founder and Director of R&D >> >> On Wed, Jul 6, 2016 at 7:07 PM, Filip Haglund <[email protected]> >> wrote: >> >>> I'd like ExUnit to sort its output by source code line number and path. >>> This simplifies fixing multiple test cases in a row, when that's what >>> you're doing, and it shouldn't slow down other development. If it would >>> noticeably slow down parallell testing, only sorting output when >>> `--max-cases 1` or when some other flag is set would also be an option. >>> >>> Right now, I ran `mix test` and got failing test cases on lines `99, >>> 118, 59, 133` in the same file. The order is not even deterministic right >>> now, as the next run gave `59, 118, 133, 99` with no code changes. >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "elixir-lang-core" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/elixir-lang-core/1ac8f79e-f587-4cdb-8f8b-6c0c3c109877%40googlegroups.com >>> <https://groups.google.com/d/msgid/elixir-lang-core/1ac8f79e-f587-4cdb-8f8b-6c0c3c109877%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2BLzaNLveUWZuaWzs2yVDBbKjzShnU6Z3McPsMsd0smig%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
