Skip to content

Commit

Permalink
Update stepper.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
devmotion authored Jun 1, 2022
1 parent df8cb0e commit aa82c24
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/stepper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
chain = sample(
MyModel(), MySampler(), N; discard_initial=discard_initial, progress=false
)
@test all(as[i] === chain[i].a for i in 1:N)
@test all(bs[i] === chain[i].b for i in 1:N)
@test all(as[i] == chain[i].a for i in 1:N)
@test all(bs[i] == chain[i].b for i in 1:N)
end

@testset "Thin chain by a factor of `thinning`" begin
Expand All @@ -68,7 +68,8 @@
# Repeat sampling with `sample`.
Random.seed!(1234)
chain = sample(MyModel(), MySampler(), N; thinning=thinning, progress=false)
@test all(as[i] === chain[i].a for i in 1:N)
@test all(bs[i] === chain[i].b for i in 1:N)
@test as[1] === chain[1].a === missing
@test all(as[i] == chain[i].a for i in 2:N)
@test all(bs[i] == chain[i].b for i in 1:N)
end
end

0 comments on commit aa82c24

Please sign in to comment.