Skip to content

Commit 1ae216c

Browse files
committed
Bound psample test.
1 parent ff9e935 commit 1ae216c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

test/runtests.jl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,13 @@ using MCMCChains
5353
@test mean(chain2.σ) 1.0 atol=0.1
5454
end
5555

56-
@testset "psample" begin
57-
spl1 = StaticMH([Normal(0,1), Normal(0, 1)])
58-
chain1 = psample(model, spl1, 10000, 4; param_names=["μ", "σ"], chain_type=Chains)
59-
@test mean(chain1["μ"].value) 0.0 atol=0.1
60-
@test mean(chain1["σ"].value) 1.0 atol=0.1
56+
if VERSION >= v"1.3"
57+
@testset "psample" begin
58+
spl1 = StaticMH([Normal(0,1), Normal(0, 1)])
59+
chain1 = psample(model, spl1, 10000, 4; param_names=["μ", "σ"], chain_type=Chains)
60+
@test mean(chain1["μ"].value) 0.0 atol=0.1
61+
@test mean(chain1["σ"].value) 1.0 atol=0.1
62+
end
6163
end
6264

6365
@testset "Proposal styles" begin

0 commit comments

Comments
 (0)