diff --git a/test/runtests.jl b/test/runtests.jl index 42cdb6d..c25d19e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -33,13 +33,15 @@ if GROUP == "All" || GROUP in ("ForwardDiff", "Zygote", "ReverseDiff", "Tracker" include("ad/distributions.jl") end -# Run doctests -@testset "doctests" begin - DocMeta.setdocmeta!( - DistributionsAD, - :DocTestSetup, - :(using DistributionsAD); - recursive=true, - ) - doctest(DistributionsAD; manual=false) +# Run doctests (but not on older versions as rng seed behaves differently) +@static if VERSION >= v"1.10" + @testset "doctests" begin + DocMeta.setdocmeta!( + DistributionsAD, + :DocTestSetup, + :(using DistributionsAD); + recursive=true, + ) + doctest(DistributionsAD; manual=false) + end end