Skip to content

Commit

Permalink
added some dropped tests
Browse files Browse the repository at this point in the history
  • Loading branch information
torfjelde committed Nov 11, 2024
1 parent decaa78 commit b67f51b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/test_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,10 @@ function test_context(context::DynamicPPL.AbstractContext, model::DynamicPPL.Mod
@test DynamicPPL.leafcontext(DynamicPPL.setleafcontext(context, leafcontext_new)) ==
leafcontext_new

# Setting the child context to a leaf should now change the leafcontext accordingly.
context_with_new_leaf = DynamicPPL.setleafcontext(context, leafcontext_new)
@test childcontext(context_with_new_leaf) === leafcontext(context_with_new_leaf) === leafcontext_new

# Make sure that the we can evaluate the model with the context (i.e. that none of the tilde-functions are incorrectly overloaded).
# The tilde-pipeline contains two different paths: with `SamplingContext` as a parent, and without it.
# NOTE(torfjelde): Need to sample with the untyped varinfo _using_ the context, since the
Expand Down

0 comments on commit b67f51b

Please sign in to comment.