julia
08ea2d8f - `@testset`: with Xoshiro, restore Random.GLOBAL_SEED (#43188)

Commit
4 years ago
`@testset`: with Xoshiro, restore Random.GLOBAL_SEED (#43188) A `@testset` is supposed to restore the "global RNG state" as it was before execution (so that they can be re-ordered easily, etc.) Also, before a testset starts, the default RNG is re-seeded with the "global seed" (to help reproduce test failures). Before `Xoshiro` as the default RNG, the "global seed" was stored within a `MersenneTwister` object. It was enough for a testset to copy the default RNG at the start, and copy it back at the end. But now the global seed is stored outside of the RNG, so it should also be restored separately.
Author
Parents
Loading