Conversation
This ensure that for a given `--seed` value, a test will always start from the same seed. Otherwise previous tests using the RNG, would leak state.
|
I dunno about this one. I suspect it'll break a lot of tests out there. I have without more analysis to show that this won't "break the world" I think I'd rather leave it up to the user/test to do it themselves. I've added |
|
I consider this resolved with the addition of |
|
I still think it's more valuable to do it before each test so that a test that flakes because of Random can be reproduced consistently by providing the same seed, regardless of whether it's run alone or with the entire "Runable". |
|
I agree that could eliminate certain types of errors, but it could introduce others as well. By making the seed available the user can opt in where applicable: def setup
super
srand Minitest.seed
end |
|
Not really not, but I don't care to argue anymore. Anyways, I no longer use Minitest when I can avoid it, so no longer my problem. |
This ensure that for a given
--seedvalue, a test will always start from the same seed.Otherwise previous tests using the RNG, would leak state.
This is something we had for a very long time as a global
setup, I figured it made sense upstream.A recent commit to ruby reminded me of it: ruby/ruby@7c1553e