use a stable RNG in fakedata

This commit is contained in:
t-bltg
2021-07-22 11:49:31 +02:00
parent a39582c06e
commit fe7d957be3
6 changed files with 11 additions and 12 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ function replace_rand!(ex::Expr)
end
function fix_rand!(ex)
replace_rand!(ex)
pushfirst!(ex.args[1].args, :(rng = StableRNG(1234)))
pushfirst!(ex.args[1].args, :(rng = StableRNG(PLOTS_SEED)))
end
function image_comparison_tests(
+3 -4
View File
@@ -1,9 +1,8 @@
using Plots: guidefont, series_annotations
using Plots: guidefont, series_annotations, PLOTS_SEED
import ImageMagick
using VisualRegressionTests
using Plots
using Random
using StableRNGs
using Test
using TestImages
using FileIO
@@ -12,7 +11,7 @@ using LibGit2
import GeometryBasics
using Dates
using RecipesBase
using StableRNGs
@testset "Plotly standalone" begin
@test_nowarn Plots._init_ijulia_plotting()
@@ -68,7 +67,7 @@ end
include("imgcomp.jl")
# don't actually show the plots
Random.seed!(1234)
Random.seed!(PLOTS_SEED)
default(show=false, reuse=true)
is_ci() = get(ENV, "CI", "false") == "true"
const PLOTS_IMG_TOL = parse(