Skip to content

Commit b67f51b

Browse files
committed
added some dropped tests
1 parent decaa78 commit b67f51b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test_utils.jl

+4
Original file line numberDiff line numberDiff line change
@@ -1127,6 +1127,10 @@ function test_context(context::DynamicPPL.AbstractContext, model::DynamicPPL.Mod
11271127
@test DynamicPPL.leafcontext(DynamicPPL.setleafcontext(context, leafcontext_new)) ==
11281128
leafcontext_new
11291129

1130+
# Setting the child context to a leaf should now change the leafcontext accordingly.
1131+
context_with_new_leaf = DynamicPPL.setleafcontext(context, leafcontext_new)
1132+
@test childcontext(context_with_new_leaf) === leafcontext(context_with_new_leaf) === leafcontext_new
1133+
11301134
# Make sure that the we can evaluate the model with the context (i.e. that none of the tilde-functions are incorrectly overloaded).
11311135
# The tilde-pipeline contains two different paths: with `SamplingContext` as a parent, and without it.
11321136
# NOTE(torfjelde): Need to sample with the untyped varinfo _using_ the context, since the

0 commit comments

Comments
 (0)