From 692cfe4f528d497c4d48ea07bed3e9cb937216e8 Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Sun, 20 Sep 2015 22:59:25 -0400 Subject: [PATCH] added srand calls to tests and examples --- docs/example_generation.jl | 3 +++ test/runtests.jl | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/example_generation.jl b/docs/example_generation.jl index 6893f8eb..12d66202 100644 --- a/docs/example_generation.jl +++ b/docs/example_generation.jl @@ -126,6 +126,9 @@ function generate_markdown(pkgname::Symbol) try + # we want to always produce consistent results + srand(1234) + # run the code map(eval, example.exprs) diff --git a/test/runtests.jl b/test/runtests.jl index 796477d5..dec73172 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -5,7 +5,7 @@ using FactCheck # don't actually show the plots plotDefault!(:show, false) - +srand(1234) # note: we wrap in a try block so that the tests only run if we have the backend installed try