Skip to content

Commit 03a47d3

Browse files
committed
Remove unnecessary test
1 parent 6bdf29d commit 03a47d3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/mcmc/Inference.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,19 +116,16 @@ using Turing
116116
@testset "Prior" begin
117117
N = 10_000
118118

119-
# Note that all chains contain 3 values per sample: 2 variables + log probability
120119
@testset "Single-threaded vanilla" begin
121120
chains = sample(StableRNG(seed), gdemo_d(), Prior(), N)
122121
@test chains isa MCMCChains.Chains
123-
@test size(chains) == (N, 3, 1)
124122
@test mean(chains, :s) 3 atol = 0.11
125123
@test mean(chains, :m) 0 atol = 0.1
126124
end
127125

128126
@testset "Multi-threaded" begin
129127
chains = sample(StableRNG(seed), gdemo_d(), Prior(), MCMCThreads(), N, 4)
130128
@test chains isa MCMCChains.Chains
131-
@test size(chains) == (N, 3, 4)
132129
@test mean(chains, :s) 3 atol = 0.11
133130
@test mean(chains, :m) 0 atol = 0.1
134131
end
@@ -139,8 +136,9 @@ using Turing
139136
)
140137
@test chains isa Vector{<:NamedTuple}
141138
@test length(chains) == N
142-
@test all(length(x) == 3 for x in chains)
143139
@test all(haskey(x, :lp) for x in chains)
140+
@test all(haskey(x, :logprior) for x in chains)
141+
@test all(haskey(x, :loglikelihood) for x in chains)
144142
@test mean(x[:s][1] for x in chains) 3 atol = 0.11
145143
@test mean(x[:m][1] for x in chains) 0 atol = 0.1
146144
end

0 commit comments

Comments
 (0)