Skip to content

Commit 3bb7ade

Browse files
committed
Remove duplicated tests
1 parent 891b4b3 commit 3bb7ade

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

test/varinfo.jl

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -959,43 +959,6 @@ end
959959
@test merge(vi_double, vi_single)[vn] == 1.0
960960
end
961961

962-
@testset "sampling from linked varinfo" begin
963-
# `~`
964-
@model function demo(n=1)
965-
x = Vector(undef, n)
966-
for i in eachindex(x)
967-
x[i] ~ Exponential()
968-
end
969-
return x
970-
end
971-
model1 = demo(1)
972-
varinfo1 = DynamicPPL.link!!(VarInfo(model1), model1)
973-
# Calling init!! should preserve the fact that the variables are linked.
974-
model2 = demo(2)
975-
varinfo2 = last(DynamicPPL.init!!(model2, deepcopy(varinfo1), InitFromPrior()))
976-
for vn in [@varname(x[1]), @varname(x[2])]
977-
@test DynamicPPL.istrans(varinfo2, vn)
978-
end
979-
980-
# `.~`
981-
@model function demo_dot(n=1)
982-
x ~ Exponential()
983-
if n > 1
984-
y = Vector(undef, n - 1)
985-
y .~ Exponential()
986-
end
987-
return x
988-
end
989-
model1 = demo_dot(1)
990-
varinfo1 = DynamicPPL.link!!(DynamicPPL.untyped_varinfo(model1), model1)
991-
# Calling init!! should preserve the fact that the variables are linked.
992-
model2 = demo_dot(2)
993-
varinfo2 = last(DynamicPPL.init!!(model2, deepcopy(varinfo1), InitFromPrior()))
994-
for vn in [@varname(x), @varname(y[1])]
995-
@test DynamicPPL.istrans(varinfo2, vn)
996-
end
997-
end
998-
999962
# NOTE: It is not yet clear if this is something we want from all varinfo types.
1000963
# Hence, we only test the `VarInfo` types here.
1001964
@testset "vector_getranges for `VarInfo`" begin

0 commit comments

Comments
 (0)