@@ -27,7 +27,7 @@ export TestSetException
27
27
import Distributed: myid
28
28
29
29
using Random
30
- using Random: AbstractRNG, get_local_rng
30
+ using Random: AbstractRNG, default_rng
31
31
using InteractiveUtils: gen_call_with_extracted_types
32
32
using Core. Compiler: typesubtract
33
33
@@ -1106,7 +1106,7 @@ function testset_beginend(args, tests, source)
1106
1106
# we reproduce the logic of guardseed, but this function
1107
1107
# cannot be used as it changes slightly the semantic of @testset,
1108
1108
# by wrapping the body in a function
1109
- local RNG = get_local_rng ()
1109
+ local RNG = default_rng ()
1110
1110
oldrng = copy (RNG)
1111
1111
try
1112
1112
# RNG is re-seeded with its own seed to ease reproduce a failed test
@@ -1196,7 +1196,7 @@ function testset_forloop(args, testloop, source)
1196
1196
arr = Vector {Any} ()
1197
1197
local first_iteration = true
1198
1198
local ts
1199
- local RNG = get_local_rng ()
1199
+ local RNG = default_rng ()
1200
1200
local oldrng = copy (RNG)
1201
1201
Random. seed! (RNG. seed)
1202
1202
local tmprng = copy (RNG)
@@ -1650,7 +1650,7 @@ Base.similar(A::GenericArray, s::Integer...) = GenericArray(similar(A.a, s...))
1650
1650
1651
1651
" `guardseed(f)` runs the function `f()` and then restores the
1652
1652
state of the global RNG as it was before."
1653
- function guardseed (f:: Function , r:: AbstractRNG = get_local_rng ())
1653
+ function guardseed (f:: Function , r:: AbstractRNG = default_rng ())
1654
1654
old = copy (r)
1655
1655
try
1656
1656
f ()
0 commit comments